First call to Azure Data Lake is very slow

Viewed 79

I am working with Azure Data Lake Gen2, .NET client (Azure.Storage.Files.DataLake 12.8.0)

Given the following F# code, running on premises.

open Azure.Storage.Files.DataLake
.
.
.
let azdlc = DataLakeServiceClient(System.Uri(dfsUri), sharedKeyCredential)
for i = 1 to 2 do 
    let fs = azdlc.GetFileSystemClient(repo)
    fs.CreateIfNotExists() |> ignore // > 20s when i = 1
    let dir = (fsCli repo).GetDirectoryClient(directory)
    dir.CreateIfNotExists() |> ignore // > 20s when i = 1
    let file = (dirCli repo directory).GetFileClient(fileName)
    file.CreateIfNotExists() |> ignore

the first time (i = 1) CrateIfNotExists() runs for FileSystem and Directory (not for File), the call lasts more than 20s. After the first call (i > 1) they last much less (less than 1s). This regardless of the resource exist already or not.

It seems too long to me. Is it normal?

0 Answers
Related