Niall’s virtual diary archives – Saturday 13th April 2013

by . Last updated . This page has been accessed 14 times since the 26th March 2019.

Saturday 13th April 2013: 4.55am. Turns out Linux sucks:

POSIX compat backend on Linux 3.2 x64, 3.5Ghz Ivy Bridge on 256Gb Samsung 830 SSD:

It took 0.004284 secs to dispatch all operations
It took 7.51752 secs to finish all operations

It took 6.38049 secs to do 156.728 file opens per sec
   It took 6.3762 secs to synchronise file opens
It took 1.1153 secs to do 896.619 file writes per sec
It took 0.023602 secs to do 42369.3 file closes per sec
It took 0.002412 secs to do 414594 file deletions per sec

The sucky 156 file opens per sec is because I have to fsync the containing directory after every file creation, which quite frankly is crap seeing as no other POSIX requires that. That means 1000 directory fsyncs, and directory fsyncs on Linux are slow, slow, slow. Here's the same test with directory fsyncs disabled:

It took 0.004541 secs to dispatch all operations
It took 1.27249 secs to finish all operations

It took 0.01752 secs to do 57077.6 file opens per sec
   It took 0.012979 secs to synchronise file opens
It took 0.00727 secs to do 137552 file writes per sec
It took 1.24143 secs to do 805.522 file closes per sec
It took 0.010814 secs to do 92472.7 file deletions per sec

Isn't it strange that file closes (which do a fsync before close) are much faster in the former than the latter?

Go back to the archive index Go back to the latest entries

Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2013-04-13 04:55:58 +0000 UTC)