How to fix very slow server performance on OS X Lion?

I have a 2008 Mac Pro (MacPro3.1 -- dual 3 GHz quad-core Xeon, 6GB memory) running Lion (10.7.3) that I'm using for as a server for a business (files, print, media, etc.) as well as a development server for a pretty standard PHP stack. From time to time, but most of the time, other machines take a VERY long time to reach the machine over the network -- ten seconds to display a trivial html page, for instance. The problem seems to be one of reaching the machine -- if I watch the apache server logs after making a request, I'll initially see nothing happen, and then a burst of activity once (I'm guessing here) the request reaches the server and gets handled. But there are other times when performance is fine.

Some details:

  • I mostly see this with web access, but I sometimes also get long delays in opening up a Screen Sharing or ssh connection to the machine. Thus I don't think it's an Apache problem. Restarting Apache also doesn't have any effect.
  • If the problem is happening and I hit the same website from the Mac Pro, performance is OK. This makes me look towards the network.
  • I have another server -- a linux box -- on the same network, and it does not have these problems. So, unless there's something weird about the domain name, it doesn't seem like it's a problem with my internet service.
  • The machine is typically not under significant load -- top reports the load average as around .3, and my attempts to crank up the load (screen sharing, playing videos, etc.) don't seem to have much impact.
  • I've disabled IPv6 in the Network control panel.
  • There's nothing of obvious (to me, anyway) interest in the log files.

I realize this isn't a lot to go by, but does anyone out there have any insights? This is starting to be a real issue. Thanks!


If it is not responding to pings (meaning ping is returning "Request timeout"), then the problem is definitely not DNS or anything at the application level. I see two possibilities:

  • Hardware failure: either a switch or network interface is failing. Since you have another machine working (presumably) on the same switch, perhaps your ethernet port or ethernet cable have problems. Try a different cable. Try setting up another interface (perhaps via WiFi, or better yet via USB ethernet dongle) just so you can ping it and see if it ever goes down.

  • Configuration jitter: something may be causing your network settings to change unexpectedly, similar to if you changed the Network Location. Check your system.log and console.log. See what is happening around the times of these outages.

I have not seen OS X suddenly change its network configuration since 10.5 Server, so hardware failure seems more likely. But definitely look in your system.log and console.log.