Zašto postoji razlika u brzini otvaranja fajlova kada ih otvaram prvi put i kada ih otvaram nakon toga.
Evo primjer.
$ time md5sum song.mp3
290abe89444add77b02815c55311e452 song.mp3
real 0m2.472s
user 0m0.940s
sys 0m0.360s
$ time md5sum song.mp3
290abe89444add77b02815c55311e452 song.mp3
real 0m0.065s
user 0m0.030s
sys 0m0.030s
Razlike su još veće kod velikih fajlova:
$ time md5sum file.tar.bz2
3c6cfd9fcd180481063b4058cf6faff2 file.tar.bz2
real 0m7.072s
user 0m1.230s
sys 0m0.960s
$ time md5sum file.tar.bz2
3c6cfd9fcd180481063b4058cf6faff2 file.tar.bz2
real 0m0.165s
user 0m0.110s
sys 0m0.040s
Sumnjao sam na Journal na ext3 fajl sistemu, ali se isto dešava i na ext2 sistemima.
Mislim da se na mom ranijem sistemu (RedHat 8.0, 2.4.20) ovo nije dešavalo.
Linux 2.4.26, ext3.
Hvala unaprijed.