[Klug-general] Swapfiles
Alan Pope
alan at popey.com
Thu Aug 10 09:54:29 BST 2006
On Thu, Aug 10, 2006 at 09:18:43AM +0100, Matthew Macdonald-Wallace wrote:
> Hi all,
>
> I've just setup my home sever which acts as both a firewall/router and a
> webserver for testing sites. I've just looked at the output from "top"
> and it's showing that I've only got about 7MB of physical RAM left for
> use, (out of 512MB!) however my 1GB Swap partition isn't even being used
> (about 224K)!
>
Panic ye not.
Here's top from my laptop:-
top - 09:49:47 up 3 days, 14:44, 5 users, load average: 0.45, 0.55, 0.56
Tasks: 152 total, 3 running, 149 sleeping, 0 stopped, 0 zombie
Cpu(s): 51.2% us, 14.3% sy, 0.3% ni, 28.4% id, 0.5% wa, 3.7% hi, 1.6% si
Mem: 2073908k total, 2011160k used, 62748k free, 466132k buffers
Swap: 1052248k total, 18740k used, 1033508k free, 908280k cached
Note that it has 2GiB of RAM and most of it is used! Note also though that a
significant chunk of that is used as buffers. The Linux kernel automatically
starts using "unused" memory as buffers to improve IO performance. If that
memory was required by an application then the buffers would shrink to make
room before it starts stomping all over your swapspace..
> Is there any way I can get apache or any other process on the system
> (They're mainly dynamic websites using PHP/MySQL, so I think this could
> be the issue!) to use swap more than Physical RAM so that I don't keep
> suffering from these windows-like service outages caused by the memory
> filling up?
>
Are you actually getting outages?
Cheers,
Al.
More information about the Kent
mailing list