One large file VS. many small files

20 Mar 2008

Todya, I have to copy all fonts in my computer to my flash drive for my friends. I dragged my fonts directory to my flash drive directly without thinking anything. I surfed the internet for more than 10 mins, and then went back to the copying dialog to check the progress. It showed only 10% completed so I realized something I’d missed.

copying

Fonts directory contains a lot of small files. Directory that is controlled by SVN is same. It has a lot of meta data in form of many small files. Copying many small files is slower than one large file dramatically. Because of file system, copying one file causes at least one modification in file system. That’s mean thousands of file cause thousands of modification and this is the root of slowness.

So I clicked the cancel button, zipped the files together, copied it to my flash drive and it completed in 30 secs.

But I have to wait for another 5 mins. to delete all files I’d copied to my flash drive.

In conclusion, if you have to transfer many small files, zip it. Repeat, zip it. Period.

Comments

เพราะว่า Flash drive มันอ่านเขียน ข้อมูลพร้อมๆกันไม่ได้
เจอไฟล์เล็กๆเยอะๆ เข้าไป เลยเดี้ยง

นี่แหละคือปัญหาว่าทำไม Solid state drive มันถึงไม่มาแทน HDD สุดอืดสักกะที

Posted by แสนดี | Mar 20th, 2008 at 4:19 pm | Reply

จะจำไว้ใช้ค่ะ ;D

Posted by SE7EN | Mar 20th, 2008 at 11:50 pm | Reply

Post new comment

The content of this field is kept private and will not be shown publicly.