Linux: Large int array: mmap vs seek file?

后端 未结 4 543
清酒与你
清酒与你 2021-02-05 11:14

Suppose I have a dataset that is an array of 1e12 32-bit ints (4 TB) stored in a file on a 4TB HDD ext4 filesystem..

Consider that the data is most likely random (or at

4条回答
  •  既然无缘
    2021-02-05 12:00

    Seek performance highly depends on your file system implementation. Ext4 should be a good choice as it uses extent trees. Also if your file has linear contiguous allocation the extent tree will consist of a single entry, which makes seek trivially efficient.

提交回复
热议问题