Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

Advice on large number of PUTs #277

Open giacecco opened 9 years ago

giacecco commented 9 years ago

Hi All, I need to create almost 2m small files in an S3 bucket (see the make.js script at https://github.com/Digital-Contraptions-Imaginarium/frugal-addresses-onspd/tree/write-to-s3-directly if you are curious).

I am wondering what is the best practice to use knox to do that effectively. At the moment, I am simply writing the files one by one and observing that after the first 4000 PUTs the process becomes very slow. My guess is that there is some "buffer" of PUT requests that can't get processed fast enough.

Any advice is welcome, thanks,

Giacecco

domenic commented 9 years ago

This could be due to any number of things. Here are my guesses:

https://www.google.com/search?q=s3+batch+upload has some interesting results too