From: James Colannino <gentoo@colannino.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] More memory?
Date: Sat, 04 Dec 2004 15:49:07 -0800 [thread overview]
Message-ID: <41B24CF3.2030102@colannino.org> (raw)
In-Reply-To: <49bf44f104120318296c48f892@mail.gmail.com>
Grant wrote:
>>Swap enables the system to have more memory pages for the running processes. If
>>the OS doesn't have enough memory for a process, it'll let the process know, or
>>simply kill it.
>>
>>If you don't want swap to be used, disable it. Remember that the system also
>>uses physical ram for caching disk, not only for user processes.
>>
>>If you don't use swap, your 'inactive' processes won't go into swap. Maybe the
>>OS prefers having more disk into cache than a process in physical ram. (there
>>must be rules in Linux for that). Then, when your usually-inactive process is
>>awakened, the OS must move its pages from disk to RAM, shown as a slow answer
>>from that process.
>>
>>Reaching your memory limit without swap, is the same as reaching the memory
>>limit with swap (physical + disk). Someone who maintains a system, must select a
>>reasonable amount of 'swap' according to the expected behaviour of that system.
>>What do you want, be able of running more processes than your physical RAM
>>enables -use swap- against some slowness, or keep on your physical RAM limit,
>>keeping a normal system speed for all processes?
>>
>>conclusion: you're absolutely free for disabling your swap. System doesn't
>>require swap for "some reason", as you said.
>>
>>
>
>OK, I'm getting a better grip on memory and swap thanks to you guys.
>Let me ask this another way though.
>
>I doesn't seem like disabling swap is such a good idea, especially on
>a commercial server and especially when I'm going to be running a
>second instance of the OS inside VMware. What if my site gets a bunch
>of traffic for whatever reason all of a sudden? Maybe I'm compiling
>my kernel at the same time, and running all kinds of tests in the
>VMware'd OS. It seems like the swap needs to be there for times when
>the system is really strained and the memory fills up with active
>stuff. I remember when I was just starting with Gentoo I forgot to
>enable the swap and kept getting an out of memory error during the
>bootstrap.
>
>Maybe a better way to phrase my question is: Is it possible to set my
>server up so it will use swap when it needs it and then free it back
>up when it doesn't need it anymore? What makes me think that is
>necessary is the fact that I see a very snappy response when browsing
>my site after a fresh reboot. After it's been up for awhile, the swap
>starts to fill and it slows down. Rebooting clears out the swap and
>the snaps return.
>
>All I'm trying to do here is keep my site nice and fast.
>
>
Hey Grant, this may not help, but I'm reading posts about disk cache
going into physical memory, and I thought of something. Since you get
better performance when you reboot, try this command as root:
#sync
See if that helps. That basically flushes the cache and sends it to
disk where it would eventually go anyway. If so, then you know what's
hogging all your memory.
James
--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/
"Black holes are where God divided by zero." --Steven Wright
--
gentoo-user@gentoo.org mailing list
next parent reply other threads:[~2004-12-04 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49bf44f104120306566d7e95cc@mail.gmail.com>
[not found] ` <1102117306.10326.3.camel@sf.rout.dyndns.org>
[not found] ` <49bf44f10412031709175d496@mail.gmail.com>
[not found] ` <20041204013213.GA30529@vicerveza.homeunix.net>
[not found] ` <49bf44f104120318296c48f892@mail.gmail.com>
2004-12-04 23:49 ` James Colannino [this message]
[not found] ` <200412040853.22010.uwix@iway.na>
[not found] ` <49bf44f104120410162d888ca2@mail.gmail.com>
[not found] ` <41B2059F.2010407@pnpitalia.it>
[not found] ` <49bf44f10412041057329eda1d@mail.gmail.com>
2004-12-05 1:33 ` [gentoo-user] More memory? Bastian Balthazar Bux
2004-12-06 16:16 ` Grant
2004-12-06 17:20 ` Jerry McBride
2004-12-06 17:32 ` Billy
2004-12-06 20:36 ` Uwe Thiem
[not found] ` <cor8c2$pgv$1@sea.gmane.org>
2004-12-05 0:27 ` [gentoo-user] " Simon Windsor
2004-12-05 1:39 ` Grant
2004-12-05 12:21 ` Tim Igoe
2004-12-05 18:05 ` Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41B24CF3.2030102@colannino.org \
--to=gentoo@colannino.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox