Re: Kernel memory leak in 8.2-PRERELEASE?



on 05/04/2011 17:04 Pete French said the following:
Adding some swap would help a lot more.

So, I run a lot of systems without swap - basically my
thinking at the time I set them up went like this.

"I have 4 gig of memory, and 4 gig of swap. Surely running 8 gig of
memory and no swap will be just as good ?"

but, is that actually true ? Is real RAM as good as an equivalent amount
of swap, or is there smething special about swap which means you shoud
have some no matter how much RAM you have ?

I think that it depends.
I usually do use swap for the following reasons:
1. some anonymous memory ("malloced") may reasonably go to swap to free some RAM
for caching data; that can have overall performance benefits depending in system
usage patterns;
2. VM is happy dealing out RAM for any uses until some low watermarks are reached,
then the system tries to free up some RAM. Depending on the amount of memory (and
those thresholds) and "burstiness" of memory demand a system may potentially run
completely out of memory and would have to kill some processes.
Having swap provides some cushion. Swap kind of smooths any bursts. (And it can
also slow things down as a side effect)
Of course, the system can run out of swap as well, but that would mean that you
really need more RAM.

--
Andriy Gapon
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: OT (slightly) swap limits
    ... influence your decision on how much swap was enough. ... processes due to lack of memory. ... I've run machines with 1Gig or more RAM with NO SWAP. ... Linux possible when before on Unix it wasn't? ...
    (Debian-User)
  • Re: fedora-list Digest, Vol 10, Issue 167
    ... Well, I have two 433 MHz Celerons and 288 MB RAM, and no performance ... > The memory usage is always around 400MB. ... I'd like to introduce you to the vmstat command. ... > I know that SWAP should be double the Physical RAM but I don't have ...
    (Fedora)
  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... >> memory and hence causes the kernel to 'thrash' thus slowing down the ... 4GB physical RAM + 4GB swap area) the application will think that it can ... You've said in another message that your app is ...
    (comp.os.linux.setup)
  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... >> memory and hence causes the kernel to 'thrash' thus slowing down the ... 4GB physical RAM + 4GB swap area) the application will think that it can ... You've said in another message that your app is ...
    (comp.os.linux.misc)
  • Re: FreeBSD data size tuning
    ... It seems there is a memory issue in 4.9 where they adapted 5.x things ... RAM and using 2500MB of swap on ide disk, ... With 1GB of RAM you should be able to run squid without any ...
    (freebsd-performance)