Test
I am now testing the maximal number of files NFSv4 is able to create. I test with the kernel 2.6.12-rc6-CITI_NFS4_ALL-4. The test is a simple python script which create a directory, mesure the time to create 100 files in the directory, and repeat the operation. There is one thread running and NFSv4 share is configured with the default option (sync). br>
The test tool is able to generate and list up to 1,750,000 files. The time to create files is linear O(n) while the number of files in the directory is less than 1,620,095. br>
In the first diagram, the interpolated curve: is: t(n)=0,03751621*n
Point used to construct the curve: are : (0,0); (1623600, 60911)
The curve:s are :
- Blue line 1 : t1(n)=0,00000125*n+3.07189512
- Blue line 2 : t2(n)=0,0018904893423519*n-3057.6720987556000000
- Intersection is at n= 1,620,093
- time to create 100 directories when 1,620,000 files are yet created is 4.67s
- time to create 100 directories when 1,625,000 files are yet created is 13.26s
There is a change of the dispersion of the times to create new directories when the number of files is between 160300 and 734500. So we can differentiate 3 zones :
- Hight dispersion of times to create 100 files, Time to create 100 new files between 2 and 4 seconds
- low dispersion of times to create 100 files. Time to create 100 new files is near 4 seconds
- low dispersion of times to create 100 files. Time to create 100 new files is over 13 seconds
Conclusion
- The test tool is able to generate more than 1,750,000 files.
- Time to create new files is growing quickly when the number of files in a directory is over 1,620,000
- The time to create files is linear O(n)
- Time to create 100 files is ~3,75seconds
- Number of files created in 1 second is 26,65 files.
Be aware this result is obtained with a synchronous NFSv4 share with only one thread. Others tests will be performed to analise the behaviour of NFSv4 on asynchronous shares and with multiples threads.
Software configuration
- Server :
- Export options are :
/export *(rw,wdelay,insecure,no_root_squash,no_subtree_check,fsid=0)
- mount options, NFSv4 :
rsize=32768,wsize=32768,timeo=14,intr,noauto
- Linux 2.6.12-rc4-CITI_NFS4_ALL-1
hardware configuration
(Client and Server) br>
- 2 processors : Intel(R)
- Xeon(TM) CPU 2.80GHz, cache 512 KB
- Total memory: 2Gb
- Ethernet: 1Gb/s link
- Distribution : modified Fedora Core 2