Re: newbie question about memory
- From: Stefan Patric <tootek2@xxxxxxxxx>
- Date: Sat, 28 Apr 2007 06:44:51 GMT
On Fri, 27 Apr 2007 22:00:36 -0700, Sergei Shelukhin wrote:
Hi. I am a database prorgammer and I work on windows/MSSQL or with
small MySql databases 90% of the time, however on a project that is on
the way now, I have to use PostgreSQL on Linux; moreover, I need to
configure the server.
So, as I was figuring out the amount of memory on the server that I
can grab for db server operations, I stumbled upon an interesting
thing.
According to cat /proc/meminfo, I have 2 Gb of memory and 500Mb are
free.
Now the database is very big, but it's not operating it, so I was
surprised to see such a high memory use.
I checked ps -eo user,comm,%mem, and memory percents total to about
1.2% 0_o I see a lot of fancy labels in meminfo output, cached, etc,
but I cannot figure out what they mean and google seems
uncooperative :)
I have two questions
1) Where did the memory go?
No where. It's still there.
2) Can it be freed e.g. can I safely assume that I have 1-1.5Gb for
PostgreSQL to roam free?
Don't worry. Linux uses memory to cache everything for speedy response,
and leaves only a little "free" memory. The "used" memory will be
released, or reallocated, really, by the kernel, as needed, for apps and
data. It's the way Linux works.
Also, be sure to have a big enough swap partition just in case that
database really uses up all your RAM. Depending on how big the DB, the
swap should be equal to to twice RAM. Although I have heard of major
numbering crunching mathematical analysis guys going up to 4 time RAM for
the swap. However, for "normal" computing a 512 MB to 1 GB swap on a 2 GB
RAM machine is more than adequate. I have a 2 GB machine and 512 MB swap
that I doing professional level image processing on, and the swap is
rarely used at all.
Stef
.
- References:
- newbie question about memory
- From: Sergei Shelukhin
- newbie question about memory
- Prev by Date: newbie question about memory
- Next by Date: Globe7 has Launched new VOIP! Phone for linux users
- Previous by thread: newbie question about memory
- Next by thread: Re: newbie question about memory
- Index(es):
Relevant Pages
|