-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client memory footprint on file upload has been high due to several locations of inefficiency. This fixes some of those: - Reduce disk read queue size. - Limit upload concurrency to hardware parallelism (# of cores). - Drop large buffer preemptively before "slow" network transmission. Context: Before the above changes the theoretical memory usage is: ![405850025-bdfc5fe0-f891-4fba-9b39-44be6aa3b6f6](https://github.com/user-attachments/assets/5f0b05f7-196d-4353-a474-ef251a56af76) This PR reduces the memory usage to the below without compromising speed (benchmarked with same settings as in https://www.notion.so/huggingface2/Xorb-upload-speed-1531384ebcac8012bf74fa08ed822f67): ![405850334-3de3648b-b30d-41a9-a0f7-9088ee6f7644](https://github.com/user-attachments/assets/c5e2b5bf-18c2-4d5c-a0f6-c9bf89e77b92) There is still ~650 MiB extra memory footprint demanding further investigation. The 512 MiB global Xorb uploader memory footprint can also be significantly reduced, but that requires more work in the future.
- Loading branch information
Showing
3 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters