bergman on 16 Nov 2009 12:43:14 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] To Drop or Not Drop Caches



In the message dated: Mon, 16 Nov 2009 14:54:15 EST,
The pithy ruminations from "Brian Vagnoni" on 
<Re: [PLUG] To Drop or Not Drop Caches> were:
=> ----- Original Message -----
=> From: bergman@merctech.com
=> 
=> > Can you give more background about how caching filesystem data in
=> > unused memory=20
=> > is substantially slowing down your system (hardware, application
=> > requirements,=20
=> > how caching was determined to be the problem, etc.)=3F
=> 
=> ----- Original Message -----
=> 
=> 
=> First, thanks for the response.
=> 
=> It's a VMware Workstation 7 guest VM, running Opensuse 11.1, on a Win200


Hmmm...that environment is sufficiently far away from a simple Linux install 
that I really wouldn't start performance tuning with things like the guest OS 
filesystem cache... Have you looked at:

	http://www.google.com/search?q=vmware+linux+guest+desktop+performance+tuning

which quickly leads to:

	http://tidbitsofit.blogspot.com/2009/10/vmware-performance-tuning-linux-guest.html
	http://planetlotus.org/profiles/john-willemse_39530

=> 3R2 Server Host. I have a U320 disk array with a pre-allocated 35gb disk
=> , at roughly 50% full on all partitions. I have 2 2.8GHz Opterons, out o
=> f 4 on the host, and 3GB of memory alloted the VM, out 7GB on the host. 
=> I have a 2gb swap file, and got my swap on :-). I have it operating in b
=> ridged mode with a WAN address, and no LAN.


OK. I'm not very familiar with VMware configuration or tuning. One thing that 
jumps out at me is that the host has 7GB (an odd number, which suggest 
sub-optimal memory interleaving), and the guest has 3GB. When the guest is 
idle, what does the memory usage and caching look like from the Windows point 
of view? In other words, is Windows swapping out a lot of the memory used by 
the guest OS, so that when you begin using the guest there's poor performance 
and a lot of disk activity, even though the Linux guest is lightly used?

Are you getting this situation:
	http://serverfault.com/questions/37117/how-can-i-keep-my-vmware-guest-process-fully-resident-in-memory-on-ubuntu-linux-h
where the guest & host OSs are reversed?


=> 
=> I mainly run openvpn, ssh, http, and webmin, irc cleints, x11 forward, &
=>  vnc, behind the firewall. It's a part time desktop, and secure remote g
=> ateway for me.

I'm guessing that the X11 apps, vnc, and possibly http are the major consumers 
of memory. What does "top" show?

=> 
=> So what I initially noticed was a slow to respond desktop. When I looked
=>  at the u320 cage, all of the drive lights were flashing away for long p
=> eriods, more so that usual, for my light load. I checked the Opensuse sy

I don't know how modern VM works with Linux guests...if it stores the entire 
guest system as a single image file (35gb, in your case), then I'd expect to 
see a little more I/O than for equivalent access to a traditional filesystem.

Of course, you may be seeing the disk access because of something at the VMWare 
or Win2003 level...particularly if the "slow to respond" feeling was after a 
period when the VMWare instance was idle, I'd suspect something happening 
outside the Linux guest OS (does VMWare have a "suspend" behavior for idle 
guests?).

=> sinfo page, and saw that the system caches had eaten up on the free ram,
=>  leaving me only 80MB available. So I rebooted to see if that took care 
=> of the problem, and started watching the cache size. The cache once agai
=> n, though very slowly, started increasing in size, and the free memory d
=> eceased in size.

That is completely normal and expected, and exactly how the system should work.

If no application needs the memory, it should be used for cache.

=> 
=> Applying the commands mentioned in the wiki helped, and we are back to z
=> ippy again
=> 
=> right now here is what free shows:

Is this when the desktop is responding well?

=> 
=> # free
=>              total       used       free     shared    buffers     cache
=> d
=> Mem:       3145000    1032788    2112212          0      30520     39127
=> 6
=> -/+ buffers/cache:     610992    2534008
=> Swap:      2104472          0    2104472

The fact that swap is not being used says that you've got sufficient memory. 
Since some of that memory is free, it will be used for caching.

Since you're only using ~1GB of RAM, it's hard to imagine going from a 
completely idle system to running your desktop apps is slowed down that 
substantially by evacuating a few hundred MB from the cache.

=> 
=> --------------------------------------------------
=> Brian Vagnoni
=> PGP Digital Fingerprint
=> F076 6EEE 06E5 BEEF EBBD  BD36 F29E 850D FC32 3955
=> --------------------------------------------------
=> 



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug