Re: Remove constructor from buffer_head

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 3 May 2007, Andrew Morton wrote:

> The change looks nice, but I'd microbenchmark it with a write-to-ext2-on-ramdisk
> or something like that.

Hmmm... How does one benchmark buffer head performance? Guess just by 
copying files? Not sure if the following will cut it.

Two tests. First copying 8M of small files into a 16M ramdisk:

for i in 1 2 3 4 5 6 7 8 9; do

        mke2fs /dev/ram0 >/dev/null
        mount /dev/ram0 /media >/dev/null
        time cp -a /etc /media
        umount /dev/ram0

done;


No constructor

real    0m0.104s
user    0m0.016s
sys     0m0.056s

real    0m0.090s
user    0m0.008s
sys     0m0.056s

real    0m0.089s
user    0m0.016s
sys     0m0.048s

real    0m0.097s
user    0m0.004s
sys     0m0.064s

real    0m0.091s
user    0m0.008s
sys     0m0.052s

real    0m0.091s
user    0m0.004s
sys     0m0.060s

real    0m0.098s
user    0m0.008s
sys     0m0.060s

real    0m0.091s
user    0m0.000s
sys     0m0.064s

real    0m0.090s
user    0m0.012s
sys     0m0.052s

W/constructor

real    0m0.099s
user    0m0.004s
sys     0m0.100s

real    0m0.098s
user    0m0.008s
sys     0m0.096s

real    0m0.091s
user    0m0.016s
sys     0m0.080s

real    0m0.091s
user    0m0.012s
sys     0m0.084s

real    0m0.090s
user    0m0.012s
sys     0m0.080s

real    0m0.090s
user    0m0.020s
sys     0m0.076s

real    0m1.269s
user    0m0.012s
sys     0m0.084s

real    0m0.095s
user    0m0.016s
sys     0m0.084s

real    0m0.096s
user    0m0.020s
sys     0m0.084s

The no constructor numbers are generally lower.
Lowest is no constructor with 0.089.

Second. Copy vmlinux (52M) to 128M ramdisk:

for i in 1 2 3 4 5 6 7 8 9; do

        mke2fs /dev/ram0 >/dev/null
        mount /dev/ram0 /media >/dev/null
        time cp slub/vmlinux /media
        umount /dev/ram0

done;


No constructor:

real    0m2.095s
user    0m0.000s
sys     0m0.168s

real    0m0.187s
user    0m0.008s
sys     0m0.124s

real    0m0.186s
user    0m0.008s
sys     0m0.120s

real    0m0.195s
user    0m0.008s
sys     0m0.128s

real    0m0.177s
user    0m0.004s
sys     0m0.120s

real    0m0.182s
user    0m0.004s
sys     0m0.120s

real    0m0.186s
user    0m0.008s
sys     0m0.120s

real    0m0.190s
user    0m0.004s
sys     0m0.128s

real    0m0.174s
user    0m0.004s
sys     0m0.116s


Constructor

real    0m0.183s
user    0m0.004s
sys     0m0.188s

real    0m0.183s
user    0m0.004s
sys     0m0.192s

real    0m0.177s
user    0m0.012s
sys     0m0.176s

real    0m0.186s
user    0m0.004s
sys     0m0.192s

real    0m0.187s
user    0m0.008s
sys     0m0.188s

real    0m0.184s
user    0m0.004s
sys     0m0.192s

real    0m0.177s
user    0m0.012s
sys     0m0.176s

real    0m0.183s
user    0m0.004s
sys     0m0.192s

real    0m0.182s
user    0m0.004s
sys     0m0.188s

Same here. Low is 0.174 no constructor.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux