3
0
I've spent half a day trying to figure out why a simple network comms app runs slower on what seems to be a better specced machine.
There are two programs: a simple client which, over TCP/IP connects to the server, writes (the same) message and waits for a reply, before writing the same message again. The simple server waits for the client to write a message, and then writes (the same) message to the client. This exchange is done in a loop 1M times. This test is being done over localhost.
This interaction on the older computer achieves about 90000 messages per second, and on the newer computer achieves about 44000 messages per second, even though the newer computer has better specs, and doesn't have any other user processes running on it.
The older computer:
- is a shared dev box - various other processes run in tandem with my tests
- has 16 Intel(R) Xeon(R) CPU X5570 @ 2.93GHz processors
- has 49Gb of memory, of which only about 5Gb is free
The newer computer:
- is not shared - the only processes running are my own
- has 24 Intel(R) Xeon(R) CPU X5690 @ 3.47GHz processors
- has 24.5Gb of memory, of which 21Gb is free
I have checked the following:
- OS Kernels are the same. Uname -a shows: Linux ficsydapd20 2.6.18-238.9.1.el5 #1 SMP Fri Mar 18 12:42:39 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
- memory architecture is better on the newer machine - benchmarked using cachebench
- newer machine outperformed on a cpu benchmark - Fhourstone
- strace shows roughly the same amount of system calls
- vmstat shows no paging while program is running
- MTU is the same for loopback device via /sbin/ifconfig
- Default socket buffers used for both systems checked using /proc/sys/net/ipv4/tcp_wmem and /proc/sys/net/ipv4/tcp_rmem
- localhost is defined as 127.0.0.1 on /etc/hosts for both machines
Does anyone know what could be the issue, or what might provide more information?
The new machine doesn't have a slower NIC? Is it connected to a different switch? – Robert – 2012-01-06T08:39:34.260
As I'm sending traffic through the loopback device, I wouldn't think the NIC/switch would matter. – Trent – 2012-01-10T00:52:51.120