Microsoft Graph - OneDrive - Large file uploads - Performance issue

Mat 0 Reputation points
2023-04-10T03:38:17.05+00:00

We are using 'Upload large files with an upload session' REST API call (https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0#create-an-upload-session) in order to upload large files. Since the introduction of this API (~2017) we noticed that the transfer performance is rather underwhelming. After revising the issue and running some tests it seems that this is still the case. For example, when uploading 100 4GB files we get an average transfer rate of around 25 MByte/s. Compared to Google Drive where the transfer rate for the same files maxes out the bandwidth of the connection (GBit/s), regardless of the physical location of the involved peers. One obvious cause for this is the rather low max fragment size of 60MB and the fact that all requests have to be done in sequential order:
"You can upload the entire file, or split the file into multiple byte ranges, as long as the maximum bytes in any given request is less than 60 MiB." As an intermediary "fix" is there a chance the max fragment size can be increased to a more suitable value for today's typical bandwidth delay products? This would reduce the number of requests and therefore the time where no data is being sent at all. Thank you.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,458 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
981 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-04-10T05:11:29.3733333+00:00

    Hello Mat,

    Thanks for reaching out!

    As per the documentation, you can only upload the entire file, or split the file into multiple byte ranges, as long as the maximum byte in any given request is less than 60 MiB, otherwise you might get throttled.

    Please follow the best practices while creating upload session as well.

    Hope this helps. If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments