saltbo / zpan

A self-hosted cloud disk base on the cloud storage./ 一个基于云存储的网盘系统,用于自建私人网盘或企业网盘。
https://zpan.space
GNU General Public License v3.0
1.83k stars 236 forks source link

set quota for the num of files in the folders #6

Closed saltbo closed 4 years ago

XiangYu0777 commented 4 years ago

Received.

XiangYu0777 commented 4 years ago

@saltbo How much quota is proper ??

saltbo commented 4 years ago

FAT 512 Files Per Folder

FAT32 65,534 Files Per Folder

NTFS 4,294,967,295 Files Per Folder

Ext3 31,998 Files Per Folder

Ext4 64,998 Files Per Folder

The above are the limitations of some commonly used file systems. ZPan's file system is a fake fs based on a database, so we either support page-turning or limit the number of files in each directory. From the experience point of view, page-turning is not suitable in this scenario, so we choose to set the file limit.

For the specific restrictions, I think we need to do a wave of tests. For example, in the case of adding an index, fill the database with 10,000 data to see how fast the query speed is. We need to find the largest number that ensuring the query speed.

XiangYu0777 commented 4 years ago

clear.