Re: 2.1.114 VFS code 5x slower than 2.0.33?!?

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
11 Aug 1998 21:28:10 +0200


alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> ---------Case 1---------
>
> > > Notice how 2.1.114 spends much more time in the kernel (6 times more
> > > than 2.0.33). Overall it is 3 times slower.
>
> Thats the dcache I suspect. Its probably a win for most uses however.
> You can use the kernel profiling to find out. Also remember to compare
> non SMP kernels with non SMP kernels
>
> > > If I'm right, this implies that 2.1.114 is very bad for proxy and/or
> > > news servers, who both operate on lots of files, creating/deleting
> > > them at fast rate.
>
> Proxies spend most of their time looking up files. I wouldnt expect that
> to be this worst case you report
>
> > > Anybody care to shed some light on this?
>
> Can you see if 2.1.115ac1 is any better on this benchmark on your box
>

OK, I have some answers.

2.0.33 is faster simply because it used whole available memory (I said
I wasn't tight on RAM) to cache things (buffer cache). 2.1.115 didn't.

2.1.1xx series has artificial *arbitrary) limit on size of the buffer
cache:

{atlas} [~/try]% cat /proc/sys/vm/buffermem
3 10 30

So, even 2.1 had plenty of RAM to use, it didn't. So it was slower.

And that's it. We really should up that numbers above to something
reasonable like 3 30 75, as a default, and let people lower them if
they really need. After I raised limits, both kernels performed with
similar results (2.1 is marginally faster).

I tested yours -ac2, too, and it really seems to work as you
advertise. It is faster, so you did a good job, Alan.

Of course, improvement is not radical, but we're in fact measuring
disk speed in this tests (disk random access), that's obvious, so even
small improvements count.

Here are few numbers (115 vs 115+ac2) to accompany theory:

original benchmark

2.1.115 1.95user 32.67sys 6:36.22real 8%CPU (84major+20minor)pagefaults 0swaps
+ ac-2 1.71user 29.73sys 6:27.17real 8%CPU (84major+20minor)pagefaults 0swaps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Second benchmark is even more interesting.
deleting 600MB file (guess what's in it :))

2.1.115 0.01user 0.52sys 0:13.45real 3%CPU (83major+9minor)pagefaults 0swaps
+ ac-2 0.00user 0.47sys 0:07.06real 6%CPU (83major+9minor)pagefaults 0swaps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ac-2 almost 2x faster (wallclock)!

Keep up the good work!

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
		My Go amn keyboar oesn't have any 's!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html