To make a better testing, I used a third server.
This is identical to the centos 7 machine, and it is not included in the replica cluster.
Nobody is accessing this machine, this is top :
top - 14:48:36 up 73 days, 17:39, 3 users, load average: 0.00, 0.01, 0.05
Tasks: 686 total, 1 running, 685 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 26383592+total, 1782196 free, 2731144 used, 25932257+buff/cache
KiB Swap: 16777212 total, 16298536 free, 478676 used. 21693456+avail Mem
These are timings :
Time: 2.841 ms
Time: 1.980 ms
Time: 2.240 ms
Time: 2.947 ms
Time: 2.828 ms
Time: 2.227 ms
Time: 1.998 ms
Time: 1.990 ms
Time: 2.643 ms
Time: 2.143 ms
Time: 2.919 ms
Time: 2.246 ms
I never got same results of the centos 6.9 machine.
2017-12-04 15:40 GMT+01:00 Nicola Contu <nicola.contu@xxxxxxxxx>:
These are the timings in centos 7 :Time: 4.248 msTime: 2.983 msTime: 3.027 msTime: 3.298 msTime: 4.420 msTime: 2.599 msTime: 2.555 msTime: 3.008 msTime: 6.220 msTime: 4.275 msTime: 2.841 msTime: 3.699 msTime: 3.387 msThese are the timings in centos 6:Time: 1.722 msTime: 1.670 msTime: 1.843 msTime: 1.823 msTime: 1.723 msTime: 1.724 msTime: 1.747 msTime: 1.734 msTime: 1.764 msTime: 1.622 msThis is top on centos 6 :[root@****]# toptop - 14:33:32 up 577 days, 23:08, 1 user, load average: 0.16, 0.11, 0.15Tasks: 1119 total, 1 running, 1118 sleeping, 0 stopped, 0 zombieCpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%stMem: 132040132k total, 129530504k used, 2509628k free, 108084k buffersSwap: 11665404k total, 331404k used, 11334000k free, 124508916k cachedThis is top on centos 7:top - 14:35:38 up 73 days, 19:00, 6 users, load average: 22.46, 20.89, 20.54Tasks: 821 total, 13 running, 807 sleeping, 0 stopped, 1 zombie%Cpu(s): 14.2 us, 5.0 sy, 0.0 ni, 77.5 id, 3.1 wa, 0.0 hi, 0.2 si, 0.0 stKiB Mem : 26383592+total, 4301464 free, 6250384 used, 25328406+buff/cacheKiB Swap: 16777212 total, 11798876 free, 4978336 used. 24497036+avail MemThe production machine is obviously more accessed. But that does not seem to be the problem as running the same query on the replica of the production machine (same config of the master but not accessed by anyone) gives the same bad result:Time: 6.366 ms2017-12-04 15:19 GMT+01:00 Chris Mair <chris@xxxxxxxx>:centos 7 :Time: 1.620 ms
Time: 3.884 ms
centos 6.9
Is there anything you can advice to solve or identify the problem?
Can you run this query 10 times on each server and note the timings?
I'd like to see the reproducability of this.
Also: both machines are otherwise idle (check with top or uptime)?
Bye,
Chris.