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