Weblog entry #18 for lykwydchykyn
Let me lay out the situation. I have a legacy app written in gtksharp that communicates directly to a mysql server. The users of the app are all on subnet A. The server is on subnet B. Most users are running this app in windows xp, but I run it in Ubuntu intrepid and another person runs it on Ubuntu Hardy.
After upgrading the server (Dell 2950) to Lenny and MySQL 5.051a, the program is unusably slow. When I say "slow", I don't mean "a little sluggish", I mean it takes literally 10 minutes for the program to load up, and 2-3 minutes to do even the smallest things in it. For all practical purposes it doesn't work.
However, I soon discovered that not everyone had this problem. So let me lay out the facts in this case as I have discovered them.
- It is slow on my computer, running Ubuntu Intrepid
- It is not slow on the Hardy heron computer
- Downgrading to the hardy version of mono/gtksharp did not fix it on my computer.
- It is slow on Windows XP running in virtualbox on my computer, running the exact same version of mono as the other (non-virtual) Windows XP boxes on Subnet A.
- It is slow on fresh installs of Lenny or Intrepid on subnet A.
- It is not slow on Lenny boxes on subnet B (can't put an intrepid box on subnet B).
- It is not slow on my Intrepid box if I change to a test server on Subnet A, also running Lenny and MySQL 5.051a with the same data dumped in.
- It is not slow when a Lenny box on Subnet B is using said test server on Subnet A.
EDIT: new info
- It is slow on a fresh install of Windows XP on subnet A.
- It is slow on a different Lenny server on subnet B for all scenarios that were slow pointing to the first server.
END EDIT
I have checked syslog, the mysql logs, and dmesg, but I don't see anything different being logged when a slow machine connects. I have run a packet sniffer on the server, and haven't seen any different traffic when a slow machine connects. I've run a program trace on the client app, and while I noticed a lot of socket exceptions being thrown, it was that way on the ones working correctly as well.
I don't realistically expect anyone to have an idea of how to fix this, but if you have any thoughts on the next thing to investigate, I'm all ears.
Comments on this Entry
CLIENT: Request Query
SERVER: Response OK
CLIENT: Request Use Database
SERVER: Response OK
CLIENT: Request Prepare Statement
SERVER: Response
CLIENT: Request Execute Statement
SERVER: Response
CLIENT: tcp SYN
SERVER: tcp SYN ACK
CLIENT: tcp ACK
CLIENT: tcp ACK
*********5 second delay*************
SERVER: Server greeting
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
I didn't know about skip-name-resolve (shows what an unworthy mysql admin I am), but after popping that into the config the problem goes away. Wow!
You just solved a day and a half of heartache for me. I cannot express how much you totally rock.
[ Parent | Reply to this comment ]
If you see a baffling problem, it's surprising how often its down to DNS or host name resolving.
Tragically, despite how often I've seen such behaviour, I almost always without fail forget to double check such stuff first and instead investigate everything but until lightbulb moment strikes "I wonder if..."
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]