[CentOS] ext3 filesystem performance question

Wed Feb 14 08:02:33 UTC 2007
Jed Reynolds <lists at benrey.is-a-geek.net>

Joachim Backes wrote:
> Hi,
>
> I'm running centos-4.4 on an SMP system with 4 dual core opterons (2.4 
> GHz),
> and 16 GB memory.
>
> The disk drives are 500 GB SATA-Drives.
>
> Wondering about times for dd command performance and rm command 
> performance in an empty machine (the filesystem has been made with 
> "mkfs.ext3 /dev/sd...", nothing more)
...
> Can somebody explain this weird behaviour. All comments are welcome.

Deleting files and recovering inodes in ext3 has often been considered 
embarassingly slow. Many articles comparing fs peformance have pointed 
that out.

How do you have your drives setup? Mirrored? JBOD? Raid controller?

I don't know a lot about how the kernel flushes buffers, but I would 
guess that if you are writing to /home and /home is on the same spindle 
as the rest of your OS, then you're dealing with basic contention. If 
/home is a separate disk, then I'd guess that the buffers for the file 
are being written to disk at different times, and the longer times 
indicate a buffer flush in the middle of the write operation, slowing it 
down.

I'd think that if you wanted to get a consistent set of times, you'd 
make sure to sync or even unmount /home and remount it between each run, 
and that should flush the kernel buffers for that filesystem and you'd 
get more consistent times.

However, you're basically not really going to get better performance 
than how fast you can write to your buffers, and if you wanted to run a 
database, it's often recommended to turn buffering off (turning sync 
option on for file system mount, IIRC(?)) so that your fs writes are 
written to disk with a minimum of loss from unwritten buffers. Depending 
on what the thruput for your SATA drive is, you're not going to get a 
bitrate that good, but close.

What bitrate for writes are you looking for? Why are you testing?

Jed