VMware and host computer slow

Vmware can be configured to use all physical memory for VM’s or it can swap part or all of the memory needed to run them.

After upgrading to Karmic Koala and VMware 6.5.3, after 10/15 minutes of using the virtual machines, my work laptop computer (an HP nx9420) would grind to an halt as the internal disk was fully active. The Linux top command show some serious activity on the kswapd daemon, and the load average just jumped to above 8/9.

In practice the swapping made my laptop useless and sometimes had to pull the plug on the VM’s (!!!).  The HP NX9420 has an old chip set, I believe 945M so it can’t support 4GB of memory, and only shows around 3.3GB of RAM available despite having 4GB installed.

So the solution? Just run vmware as root: sudo vmware and change the Settings->Memory, to not allow any memory to be swapped. The number of virtual machines that can be run now must fit to the memory value defined in this tab, but at least there is no swap activity and machines run at full speed.

Windows 2003 slow network application performance

I was bitten very hard for something that is quite hidden and took a while to figure it out.

Moved an application from Windows 2002 to Windows 2003, and in the moving process, services that where on the same machine moved to different machines, which in turn means that they would use the LAN to communicate between them instead of the loopback adapter.

Well just imagine an application running on top of the line servers (8 CPU’s, 10GB RAM) running slower than a six year old server…

The main clue that something was blocking the performance was that there was no CPU load. So the application was not processing anything, just waiting…

Or friendly tool http://www.wireshark.org/ started to bring some light on the issue. It seems that most of the times between packets namely the between the PSH/ACK and the answer took around 200ms. Again processing the application log files show a lot of processing time under 10ms and a “bump” around the 200ms mark.

To make a long story short… Despite of most of Windows server deployments being made on high speed networks on enterprise LAN segments, Windows 2003 has by default an TCP/IP algorithm called nagle active so it can save bandwidth on slow WAN links!!!!!

What does it mean? It means that Windows will reply right away with an ACK packet if it has data to transmit back, so it piggybacks the ACK with the data saving packets. If it has no data it times-out after 200ms and then sends the lone ACK packet… Meanwhile the 1/4s as passed by. Small number theory says that a lot of small numbers added up give on big number, hence seconds of pure slowness.

For all your LAN throughput can be used by your applications you need to switch off the 200ms delay:

Here’s how: http://support.microsoft.com/?scid=kb%3Ben-us%3B328890&x=11&y=13

After the above documented change, well the application just caught fire and ran like a rocket.

Update: Also check: http://support.microsoft.com/kb/898468

Update2: Also check: http://support.microsoft.com/kb/948496 -> This will disable some “features”…

(K)Ubuntu and Slow Grub Startup

After upgrading my Kubuntu version from CD, Grub started to behave strangely: After rebooting the machine it stopped for around 30s on the Phase 1.5 until the operating systems menu showed up. After selecting the operating system, another 30s until startup.

It took me a while to solve it. I followed some of the instructions that are on this post: http://forums.fedoraforum.org/archive/index.php/t-950.html

It’s not Ubuntu related, but Grub is Grub…

Anyhow, after booting and logged in, I opened a Konsole, and did the following:

1) sudo bash <- to get a administrator shell

2) Started up Grub: grub

3) And checked what is my boot disk (just to make sure): find /boot/grub/stage1

4) It looked ok, so I’ve ran: setup (hd0) (That’s a zero)

5) Quit Grub, and rebooted.

Problem solved…