0

We've installed MySQL 5.6.22 on RHEL6.6 and noticed terrible performance compared to a previous install on RHEL6.5 and MySQL 5.6.20

The main thing that we've noticed is that all the traffic appears on eth0 rather than lo so we see output from SAR like so:

Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Average: eth0 2313.71 2.01 606.04 0.61 0.00 0.00 2311.37 Average: eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Average: eth2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Average: eth3 0.00 0.00 0.00 0.00 0.00 0.00 0.00

The connections are from the local box, and connecting to 127.0.0.1. Hosts file has an entry for this as usual, in fact all the networking seems to be setup the same as the old box.

And is this a red herring or would this definitely cause the problem? Presumably loopback is faster than a real physical interface?

Codek
  • 203
  • 2
  • 9
  • 1
    Even if you were explicitly connecting to the `eth0` address, the kernel would realize it's connecting to itself and short-circuit the connection using `lo`. You can test this by having the server ping its own `eth0` address, and watch what happens with `tcpdump`. You'll actually see packets in/out on `lo`, not `eth0`. The `hosts` file is irrelevant, since it is only used for name resolution. You have something else going on, so I suggest updating your question with specifics about the performance problem. – James Sneeringer Jan 15 '15 at 17:36
  • The problems are specific to running through a JDBC connection. Queries we run over JDBC which transfer data (even locally) are very slow. Run the individual query on it's own via MySQL cmd line client and it's fast. On the old box sar correctly shows all the MySQL traffic going via the lo interface. I confirmed that pings indeed don't appear in tcpdump. – Codek Jan 16 '15 at 07:55
  • We don't know for sure yet but it's starting to look likely that the issue was that the old box was an enterprise MySQL. I Don't know much about enterprise MySQL but it seems that there are some significant performance improvements. We'll see soon. – Codek Jan 20 '15 at 19:52

0 Answers0