2

I'd like some assistance in trying to figure out what could explain Centos 7 being slower in accessing a file then Centos 6. It's about a 17% difference.

Here's a simple test:

[root@test-centos6 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m42.283s
user    0m2.465s
sys     0m4.434s
[root@test-centos6 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m41.890s
user    0m2.442s
sys     0m4.341s
[root@test-centos6 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m41.795s
user    0m2.383s
sys     0m4.310s

----

[root@test-centos7 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m49.081s
user    0m16.306s
sys     0m32.639s
[root@test-centos7 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m48.379s
user    0m16.034s
sys     0m32.191s
[root@test-centos7 shm]# time for i in $(seq 0 50000); do stat file > /dev/null; done

real    0m48.054s
user    0m15.680s
sys     0m32.245s

strace seems to confirm C7 performs more operations per stat then C6.

[root@test-centos6 shm]# strace stat file 2>&1 | wc -l
145

[root@test-centos7 shm]# strace stat file 2>&1 | wc -l
168

Anyone knows how to reduce the number of operations for C7 so perfs are more inline with C6?

Thank you,

//EDIT:

I have put both in /dev/shm to eliminate a possible xfs/ext4 difference. These are 2 identical VMs on the same ESX host, with just a different OS. (but I have observed the same difference on hardware boxes as well, just used those VMs for my current testing)

Strace C6: https://paste.fedoraproject.org/paste/oCSUZqKgcoNLJubjeNbo9V5M1UNdIGYhyRLivL9gydE= Strace C7: https://paste.fedoraproject.org/paste/PvTXvxxvS~2UZ9LuuSVAA15M1UNdIGYhyRLivL9gydE=

I would have assumed the newer C7 would have better performances in it's stock form, not worse.

[root@test-centos6 shm]# uname -r
2.6.32-642.el6.x86_64
[root@test-centos6 shm]# getenforce
Disabled

[root@test-centos7 shm]# uname -r
3.10.0-514.6.1.el7.x86_64
[root@test-centos7 shm]# getenforce
Disabled
9
  • 1
    What filesystems? What hardware? Commented Mar 1, 2017 at 17:05
  • Looks like they are in /dev/shm (ramdisk) but it would be great to get confirmation.
    – Aaron
    Commented Mar 1, 2017 at 17:18
  • I believe you may also wish to upload your strace output so people can take a peek. Not all folks may have both C6 and C7 images active somewhere.
    – Aaron
    Commented Mar 1, 2017 at 17:22
  • I've edited my question with answers.
    – Bob
    Commented Mar 1, 2017 at 17:33
  • 1
    Is this even a realistic test? How much does your actual workload rely on repeated stat() calls? Commented Mar 1, 2017 at 21:36

2 Answers 2

0

They are totally different operating systems with different kernels, compiled-defaults, filesystems, schedulers and tuning capabilities.

Why do you assume they should perform alike? There's a lot to account for, so this question will be difficult to answer in its current form.

1
  • I have assumed that the newer C7 would have better performances, or at least on-par with it's predecessor, not worse. I'm now looking for how to tune it to perform better. Thanks!
    – Bob
    Commented Mar 1, 2017 at 17:34
0

The stat utility differs between CentOS6 and CentOS7. To confirm, try issuing stat --version on both machines.

The new strace version is more complex, perhaps. For example, from your strace output, it appears that CentOS7's strace maps libpcre.so.1 (a reguar expression library), while CentOS6's strace does not.

Anyway, this basically is a canned test: to really benchmark file access/manipulation speed, you should use tools as fs_mark or, even better, some real world test (eg: untar a large archive).

Not the answer you're looking for? Browse other questions tagged .