简体   繁体   English

文件如何存储在Amazon S3 ..中?

[英]How Files are Stored in Amazon S3 ..?

We all know that Dropbox uses Amazon S3 to Backup the Files and it's been said that every 15 mins, 1 Million files are handled by Dropbox. 众所周知,Dropbox使用Amazon S3备份文件,据说每15分钟就有100万个文件由Dropbox处理。 Then the Amazon S3 reads and Writes must be huge. 然后,Amazon S3的读取和写入必须很大。

Any body have a clue how S3 can handle that many file descriptors ..? 任何机构都知道S3如何处理这么多文件描述符..? Is there any Different File System behind S3 ? S3后面有其他文件系统吗? I mean whether S3 creates a new File Descriptor for each and every file ..? 我的意思是S3是否为每个文件创建一个新的文件描述符..? Or Open a File ,write many files till it reaches some size say 1 GB and so on. 或打开文件,写入许多文件,直到达到1 GB等大小为止。

(Disclaimer: I do not actually know any of the implementation details of S3): (免责声明:我实际上不知道S3的任何实现细节):

It sounds like you are making two incorrect assumptions: 听起来您在做两个错误的假设:

  1. Every dropbox "file" == one OS "file". 每个保管箱“文件” ==一个操作系统“文件”。
  2. All files are being read/written on a single machine. 所有文件都在一台机器上读取/写入。

It's possible that each DropBox file maps to a single OS file, but it is also possible that they do something like the Google File System , which would break up files into multiple smaller files with a fixed max size. 每个DropBox文件都可能映射到一个OS文件,但是它们也可能执行类似Google File System的操作 ,该操作会将文件分解为具有固定最大大小的多个较小文件。

Secondly, these files are not going to all be stored on a single machine, but rather stored on lots of different machines. 其次,这些文件不会全部存储在单个计算机上,而是存储在许多不同的计算机上。 So, you would not have that many file descriptors open on any given machine. 因此,在任何给定的计算机上打开的文件描述符都不会太多。

Thirdly, you may have forgotten that the default maximum number of file descriptors open at any given time can be raised by ulimit (from the commandline) or setrlimit (from C code). 第三,您可能已经忘记了可以通过ulimit(从命令行)或setrlimit (从C代码)提高在任何给定时间打开的文件描述符的默认最大数目。 It would not surprise me if the limits were raised beyond the standard defaults to maximize available descriptors. 如果将限制提高到超出标准默认值以最大化可用描述符的数量,这也不会令我感到惊讶。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM