Page 2 of 2

Posted: Thu Dec 02, 2004 2:24 pm
by Dukat
hide wrote:1. As I noticed, Linux uses all the available memory after about ~2 days of uptime. I had machine with 512 DDR. I just installed debian there and nothing more.. I was busy then so I decided to leave it until weekend.. When I logged in, ant typed free -m, I noticed that it displayed about 496 mb used memory (even with no activity on the server!!). The same is on my server, however I'm sure that there's "in reality" in use about 50% of mem.
That's the way the linux memory management works - nothing to worry about.
hide wrote:3. About priorities: As far as I know, (in Linux) nice -n 19 gives the lowest priority ant nice -n -20 gives the highest? Or maybe I'm wrong?
You are right.
You cannot change the priority directly on linux, you just can influence it with the nice command. -20 = Most likely to receive time slices, the priority will be closer to zero (=highest); +19 = Least likely to receive time slices, the priority will be closer to 127 (=lowest).

Posted: Thu Dec 02, 2004 11:21 pm
by Syzop
1. As I noticed, Linux uses all the available memory after about ~2 days of uptime.[etc]
It works like this, this is for example my output:

Code: Select all

             total       used       free     shared    buffers     cached
Mem:           376        367          9          0         56        247
-/+ buffers/cache:         63        312
Swap:          478         72        405
For a quick look of how much physical memory programs actually use, see the -/+ buffers/cache field... 63mb is in use, 312mb is free. These values are except cache/buffers.
As you can see 'buffers' also uses quite some memory, and 'cached' uses a lot... The 'cached' stuff is dynamic and will shrink/grow depending on how many memory you need.. this is just Linux (&other OS's) way of dealing with 'free memory'... instead of just not using it (==wasting it), it uses it for caching instead (==speedup).
3. About priorities: As far as I know, (in Linux) nice -n 19 gives the lowest priority ant nice -n -20 gives the highest? Or maybe I'm wrong?
Oh, sorry I misread your post... I thought you said '20', not '-20' (hence also my comment on 19-instead-of-20 ;p). Nevermind.

Anyway, good to hear you got some useful results :).
Good luck.