In swift, how many files can a container hold, is there any limit about this? I've tried google this question but haven't got an answer, help!
Adrian Otto blogged about this a while ago: http://adrianotto.com/2010/09/openstack-os-is-great-for/
Don’t store unlimited objects per container
You can store as many objects in a container as you wish. However, your per-object upload latency will increase considerably one you reach a certain point. I found the optimal number of objects per container to be just under one million. This number will vary depending on your equipment, and how heavy of a workload it’s subjected to.
I believe there is no explicit limit on the number of files. However there are some inherent restrictions from the design of Swift.
Swift takes advantage of MD5 hash for identifying objects. The size of a MD5 hash is 128-bit long which means that when the number of files exceed 2^64 the collision of MD5 is going to happen with high probability. If the collision happens, the two different objects will replace each other. Therefore you may consider 2^64 a limit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With