Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Filesystem Speeds
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 11:19 am    Post subject: Filesystem Speeds Reply with quote

Hi there,

This is my first post so I'm not totally sure if this is the right location, but it seemed like the best place!

I'm currently investigating filesystem speeds (currently focusing on ext4) across a few Linux Distributions, currently the 3 we have tested on are Ubuntu, Centos and Gentoo (all 64 bit, all the most recent versions as of about 2 weeks ago). I expected CentOS to be quicker than Ubuntu and in turn Gentoo to be the fastest, and our tests have agreed with this. However, the scale of results was quite extreme. On file operations per second and write throughput, CentOS was about 10% faster than Ubuntu and Gentoo was about 80% faster than CentOS.

My question is, does this seem a bit too good? Does it seem more likely a stupid configuration error I've done on Ubuntu / CentOS? I've looked online and can't find anything conclusive!

Any comments are greatly appreciated.

Regards,

Chris
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Apr 23, 2012 11:45 am    Post subject: Re: Filesystem Speeds Reply with quote

charsent wrote:
Hi there,

This is my first post so I'm not totally sure if this is the right location, but it seemed like the best place!


Don't worry about that. Depending of the direction the thread takes I'll consider moving it elsewhere if I think it will fit better in there.

Quote:
I'm currently investigating filesystem speeds (currently focusing on ext4) across a few Linux Distributions, currently the 3 we have tested on are Ubuntu, Centos and Gentoo (all 64 bit, all the most recent versions as of about 2 weeks ago). I expected CentOS to be quicker than Ubuntu and in turn Gentoo to be the fastest, and our tests have agreed with this. However, the scale of results was quite extreme. On file operations per second and write throughput, CentOS was about 10% faster than Ubuntu and Gentoo was about 80% faster than CentOS.


That's too much of a difference, but it really depends on what you want to measure. If you don't care about having different kernels, with -possibly- different patchsets, different ext4 tools and the like, and all you want is to measure the raw and default setup for many distros, then that's ok.

But beware that -specially- the kernel version you use will have a great impact on this. Besides the kernel version which can be of a great impact, there are some very important kernel settings that will influence this (the SATA/IDE driver you use, the i/o scheduler, some settings specific to the fs itself, ...).

You also didn't say if you are using the same data and test-case to make your tests (ie. same test tools, same version of them, same disk, same partition, same files, same hardware).

Quote:
My question is, does this seem a bit too good? Does it seem more likely a stupid configuration error I've done on Ubuntu / CentOS? I've looked online and can't find anything conclusive!

Any comments are greatly appreciated.

Regards,

Chris


You should really check the kernel version. Assuming you are using something above 2.6.38 (it would really be better if you use >=3.0) the kernel should matter much then. But its configuration can certainly impact. I have no idea if ubuntu or centos will patch the kernel in a way that could affect this. You'll have to investigate that yourself.

In any case, check the i/o scheduler settings and also the sata driver that you use in all the distros. Or, if you are by chance using an IDE drive, make sure that DMA is on in all the distros. That would certainly explain an 80% difference in performance.
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Mon Apr 23, 2012 11:45 am    Post subject: Reply with quote

So you are saying (just that I got the numbers right), that gentoo is (almost) twice as fast a ubuntu?

A few thoughts about testing:
* how different is the hardware where it has been tested on?
- preferably install the OS on a single disk each, and have one common test disk/partition, which only contains the test partitions
- I assume, that you are running the tests on the same system, otherwise the test will not tell anything.
* how different is the kernel? what options are enabled
- can you rebuild a kernel on each distro using the config from another
- to get some comparable results, use ubuntu lts (10.4), centos 6.x and use gentoo-sources-2.6.32. that way to get at least the same basic kernel for every distro (IIRC all should then be running 2.6.32)
* what kernel version were used?
- only a small version change can change the entire result - to better or worse
* how was the filesytem created? did you use the distros defaults? did you create one generic partitions to run the tests on?
* what kind of software did you install? just a plain base install? default install?
- what happens, if you compare the installed package sets?

OTOH, why would you think - at least in the beginning - that CentOS would come out first?
I would have placed my bet on gentoo, as it can be optimized (and slimmed down) best.


like I said, just some thoughts. I am not sure, if I missed anything. But those numbers look a bit to good to me.
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Apr 23, 2012 11:53 am    Post subject: Reply with quote

Just to clear the thing out, provided the distros are configured the same way, and you use the same kernel, you should really not get any noticeable difference in this test. I/O is mostly a matter of the hardware these days, so as long as the drivers and the kernel involved are the same, the result should also be very similar. Userland tools shouldn't matter too much at all, that is, assuming you use the same test-case and the same partition or data set to test across all the distros.

The fact that in Gentoo you compile everything using --omg-optimized will have little to no impact on this.
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 12:00 pm    Post subject: Reply with quote

Thanks for the replies folks! Veldrin, just to confirm, my wording was a bit off but I meant I expected Gentoo to be the fastest of the 3, with CentOS being in the middle of the 3.

The hardware involved in each test is exactly the same (its all on the same machine)

The installations have been as standard as possible:

- Ubuntu 10.04 LTS, minimal install, with the newest version of the ext tools installed from git (we are testing with a 50TB volume which the standard installed version doesn't seem to support creating). Kernel is 2.6.32-24-generic.
- CentOS 6.2, same as Ubuntu. We didn't update the kernel, I believe it was 2.6.32-220, I'm afraid I'll have to reinstall the ISO to check.
- Gentoo 20120323, using the genkernel and the standard version of the ext tools it installs with. Kernel is 3.2.12-gentoo.

Does it seem possible the newest kernel would make this big a difference?

For the other points raised:

- The disk scheduler has been left as "cfq".
- The file systems have been made in the same way with the same switches.

Unfortunately some of the info I am lacking as these were just early tests and we weren't rigorous enough with noting down certain system details. However the input I've been provided is excellent for helping improve the testing going forwards!

I hope my response here might provide a little more information to help, and thanks for the responses so far!

Chris
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Mon Apr 23, 2012 12:01 pm    Post subject: Reply with quote

This experiment you did sounds surprising to me.

At the end of the day... filesystem efficiency is something kernel-only dependent.
Gentoo-Sources is not very far from stock kernel and I do not think Gentoo-patches concern the filesystems and related thingies + schedulers.

However, you can get huge differences from one kernel version to another and of course huge differences depending on what you actually test.
As an example of this, on a 4G RAM system, reading a 4G file is around 250% quicker under a 3.2.1 kernel than under a 2.6.38 one.

On another side, 16 threads competing for writing the same file will complete 25% sooner on & 2.6.38 than under a 3.2.1

So... you see... kernel version is crucial, kernel config is crucial too (do you get control groups enabled or not, type of IO scheduler, timer frequency, type of preemption...) and then finally, what do you test ? Mind you... depending on what you test, you might well be turning into testing more the efficiency of your caches than the efficiency of the filesystem itself.
_________________
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 12:06 pm    Post subject: Reply with quote

Some additional information. The test we are running is a custom developed application to replicate the standard operations we expect the systems to perform in future. In each case it is using 500 threads writing files of a random size (between 5mb and 20mb) in 32kb blocks. On top of that it is checking if Directories exists, randomly creating them, reserving space before writing, opening and closing files, etc.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Apr 23, 2012 12:15 pm    Post subject: Reply with quote

charsent wrote:
Thanks for the replies folks! Veldrin, just to confirm, my wording was a bit off but I meant I expected Gentoo to be the fastest of the 3, with CentOS being in the middle of the 3.

The hardware involved in each test is exactly the same (its all on the same machine)

The installations have been as standard as possible:

- Ubuntu 10.04 LTS, minimal install, with the newest version of the ext tools installed from git (we are testing with a 50TB volume which the standard installed version doesn't seem to support creating). Kernel is 2.6.32-24-generic.
- CentOS 6.2, same as Ubuntu. We didn't update the kernel, I believe it was 2.6.32-220, I'm afraid I'll have to reinstall the ISO to check.
- Gentoo 20120323, using the genkernel and the standard version of the ext tools it installs with. Kernel is 3.2.12-gentoo.

Does it seem possible the newest kernel would make this big a difference?


Absolutely.

Taking into account that ext4 is relatively new, it's no surprise. If my memory serves, ext4 was called "ext4dev" until 2.6.28, which is near enough .32. Note that even in recent versions some important changes have taken place regarding ext4. As I said above, if you are going to use that fs I advice you nothing below 2.6.38. That should be not a problem on any recent distro (just pick a new kernel and use it instead). But, if it is, then you definitely should change either the distro or the fs, whatever you prefer.
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 12:55 pm    Post subject: Reply with quote

Definitely sounds like everyone agrees its likely the kernel!

I'm going to try Ubuntu with the latest kernel and see what happens, thanks for the input, I'll let people know how it goes!

Thanks again folks.
Back to top
View user's profile Send private message
Dont Panic
Guru
Guru


Joined: 20 Jun 2007
Posts: 322
Location: SouthEast U.S.A.

PostPosted: Mon Apr 23, 2012 1:46 pm    Post subject: Reply with quote

What benchmark are you using?
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 1:49 pm    Post subject: Reply with quote

We've written our own custom tool that performs a load of operations logging speed/operations per sec and such at 15 second intervals (a little more information in one of my earlier posts). We then compare the results. Its written to emulate the tasks the boxes will be performing in production.
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 1:55 pm    Post subject: Reply with quote

To correct a mistake, it logs in 15 minute intervals, not seconds! :-).
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Apr 23, 2012 2:06 pm    Post subject: Reply with quote

Since the test case works in threads, you will also need to make sure that the numbers you are collecting are wide enough to make an statistical analysis. Since each run can be quite different from the previous one (due the threads and cpu and i/o schedulers) you will have to take a big number of samples. But I guess you already took that into account. :D
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Mon Apr 23, 2012 2:34 pm    Post subject: Reply with quote

One more point: You can always compile a kernel with whatever options you want for any distribution. With rare exceptions, you can compile any version of a kernel for use with any distribution, too. Given your use case, that's probably a good idea. This should render the distribution-to-distribution performance differences nil. If you're trying to decide which distribution to use, a kernel recompilation will most likely take performance out of the picture.
Back to top
View user's profile Send private message
charsent
n00b
n00b


Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon Apr 23, 2012 2:59 pm    Post subject: Reply with quote

Just finished a very unscientific test on Ubuntu 10.04 running kernel 3.2 and its considerably faster. Its still about 15% slower than the Gentoo test, but as I say, its very unscientific test and its a big enough difference to make the point.

Time for us to think exactly what we're after, whether we stick with the favoured distro used here (Ubuntu) now we can get the performance up, or continue to consider alternatives! Either way, lots more testing to do!

Thanks for all the help folks, its greatly appreciated :-).

Chris
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Mon Apr 23, 2012 3:06 pm    Post subject: Reply with quote

charsent wrote:
Some additional information. The test we are running is a custom developed application to replicate the standard operations we expect the systems to perform in future. In each case it is using 500 threads writing files of a random size (between 5mb and 20mb) in 32kb blocks. On top of that it is checking if Directories exists, randomly creating them, reserving space before writing, opening and closing files, etc.

So you are likely to be testing the efficiency of your caches, your scheduler latency and your IO scheduler efficiency...
About what you test from the filesystem itself... I do not really know...

Another point I forgot to mention... mount options may have a huge influence too.
_________________
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2021

PostPosted: Tue Apr 24, 2012 9:00 am    Post subject: Reply with quote

Having brought cache into the discussion, the next question is whether the Gentoo setup has all the same services installed and running s the other systems. If not, it may have a lot more free space for file system cache, and thereby avoid a lot of real IO. One of Gentoo advantages is tailoring your installation's services to what you need, rather than some one-size-fits-all platform. vmstat output might show significant differences.
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum