Well, your particular problem is because
- Subversion itself comes from the UNIX world, the Windows version therefore assumes similar performance characteristics.
- NTFS performance really isn't great with gazillions of small files.
What you are seeing is simply an artifact of something designed for a particular operating system with performance assumptions on that operating systems. This usually breaks down badly, when taken to other systems. Other examples would be forking vs. threading. On UNIX-likes the traditional way of parallizing something is just to spawn another process. On Windows, where processes take at least five times longer to start, this is a really bad idea.
In general, you can't just take any artifacts of a particular OS to be granted on any other one with vastly different architecture. Also don't forget that NTFS has many file system features that were absent in UNIX file systems widely in use at that point, such as journaling and ACLs. Those things come at a cost.
Some day, when I have lots of free time, I was planning to write a SVN filesystem module which takes advantage of features you have on NTFS, such as transaction support (should eliminate the "touching millions of small files issue") and alternate data streams (should eliminate the need of the separate .svn
directory). It'd be a nice thing to have but I doubt the SVN devs will get around implementing such things in the foreseeable future.
Side note: A single update on a large SVN repository I am using took around 250,000 file operations. Some tiny voice tells me that this is really much for 24 files that changed ...
5Perhaps this could be reworded so that you are asking how to improve the performance of NTFS when dealing with lots of small files, rather than asking why NTFS sucks compared to ext3? – ChrisInEdmonton – 2009-07-29T18:00:48.860
Agree with @Chris, this question is kind of pointless as-is. – Sasha Chedygov – 2009-07-29T19:00:30.957
4Well, I'm genuinely interested in why NTFS is performing badly. If the the answer is "do X to make it faster", then great, but I'd settle for understanding the problem. – JesperE – 2009-07-29T19:04:53.990
Ah, okay, sorry for misunderstanding you. – Sasha Chedygov – 2009-07-29T19:33:54.383
2BTW when you were using SVN on a Windows machine, did that machine have a virus scanner with real-time protection enabled? That could be bad. – dlamblin – 2009-07-30T19:07:18.837
I've benchmarked both ways, and while the virus scanner did have a measurable impact, it didn't explain the bad performance of NTFS. – JesperE – 2009-08-04T08:07:49.457
in some cases maybe exFAT is better because it doesn't have many NTFS's bulky features such as permission, compression, etc. – phuclv – 2013-09-11T07:19:27.373