Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Linux Memory Management or 'Why is there no free RAM?'
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
jecepede
Apprentice
Apprentice


Joined: 19 Nov 2002
Posts: 239

PostPosted: Wed Jan 19, 2005 7:46 pm    Post subject: More memory issues.... Reply with quote

Ola !

WOW ! What a chrystal clear story ! Thank you all for the explanations. I improoved my system with the swappiness-option.

I do however have a small question....

If you look at the first cat proc/meminfo-output from the guy with 512 Mb you will see this :

Quote:
Code:
ccase@miles ccase $ cat /proc/meminfo
MemTotal:       515520 kB
MemFree:          8100 kB
Buffers:          4468 kB
Cached:          35068 kB


I get simular results when I do it with my own PC.
But ! When I do it on my old Armada laptop with only 64 Mb I get :

Code:
bash-2.05b# cat /proc/meminfo
MemTotal:        60424 kB
MemFree:          3712 kB
Buffers:           372 kB
Cached:          19440 kB
SwapCached:      19764 kB
Active:          47240 kB
Inactive:         2428 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        60424 kB
LowFree:          3712 kB
SwapTotal:      124984 kB
SwapFree:        75124 kB
Dirty:              96 kB
Writeback:           0 kB
Mapped:          43356 kB
Slab:             5224 kB
CommitLimit:    155196 kB
Committed_AS:   105888 kB
PageTables:        964 kB
VmallocTotal:   974772 kB
VmallocUsed:       264 kB
VmallocChunk:   974464 kB


The total memory suddenly is oly 60 Mb and not 64 ! Where did my 4 much needed Mb's go to ???
Same thing happened on my normal PC : When I devide the 515520 Kb by 1024 I get only 503 Mb NOT 512 ???


I have see in some other topics they put an "append mem" in the lilo.conf but it doesn't seem to work for me ???


Can anyone explane that ?


Thanks guys and gals !!!




Jessy
_________________
I've got that retro-feeling :
http://instagram.com/jecepede

Check out my YouTube channel
https://www.youtube.com/jecepede
Back to top
View user's profile Send private message
miwalter
n00b
n00b


Joined: 10 Dec 2004
Posts: 66

PostPosted: Thu Jan 20, 2005 10:35 am    Post subject: Reply with quote

The guy with 512mb gets 503,44MB free reported (a "loss" of 8,56 MB). You get 59,01 MB reported (a "loss" of 4,99 MB).

I would guess this is kernel-memory or some "non usable" ram.
Back to top
View user's profile Send private message
t3gah
n00b
n00b


Joined: 11 Dec 2004
Posts: 2

PostPosted: Fri Mar 18, 2005 7:47 pm    Post subject: Reply with quote

Thanks for the explanation.

What annoys me about the 'new' kernel is that it creates a swap file twice the size of the physical memory in the system. So if you have 1.5GB or more there is this HUGE waste of space on the system because the equation the kernel has ratio wise to the amount of physical memory versus what people who have that amount of memory in their system use it for cancels out what the actual user wants or needs. In essence, the user cannot disable this "feature" just like M$ because of whatever.

There is of course another issue that comes up with all those older systems and the memory management scheme of the new kernel is there to help make things smoother, but the whole Linux 'world' has become so bloated that you now have to have 128MB minimum according to many distro's for X to even start which is wrong because I've gotten around that.

I wish this explanation was on Linux.org on the main page and on every distro site out there so people can understand the why for's, etc.

Someone from fedoraforum.org gave me this link. Kudos to everyone. I have Gentoo on one of my systems. Sweet O/S. :)
Back to top
View user's profile Send private message
vyzivus
Apprentice
Apprentice


Joined: 05 Jul 2004
Posts: 173
Location: Slovakia

PostPosted: Sat Apr 23, 2005 9:53 am    Post subject: Reply with quote

Hello,
thanks for your tutorial, it explained quite a few things. I have a few questions though.
- RES is amount of memory that the process physically occupies. So if I sum up all processes RES I get memory reported as 'used' by 'free' in '-+buffers/cache' section?
- is this the value that gnome-system-monitor shows as 'user memory' ?
- top manual states that RES = CODE + DATA. firefox-bin is obviously ignoring this equation :)
Code:
  PID USER      VIRT  RES  SHR %MEM SWAP CODE DATA COMMAND
 9991 root     80988  54m 7228  5.4  24m 1808  47m X
25597 vyzivus   236m  48m  23m  4.8 187m  112  79m firefox-bin
25557 vyzivus   186m  47m  26m  4.7 139m 1992  50m amarokapp
25387 vyzivus   133m  24m  11m  2.5 108m  292  21m gnome-terminal

- Take a look at this:
Code:
  PID  VIRT  RES  SHR %CPU %MEM    TIME+  SWAP CODE DATA COMMAND
26191 1507m 182m  58m  0.0 18.1   0:40.73 1.3g   52 1.3g java
25597  239m  52m  23m  1.3  5.2   1:56.42 187m  112  83m firefox-bin
25557  187m  46m  25m  4.3  4.6   5:20.10 141m 1992  50m amarokapp

Here, java takes 1,3GB of SWAP space?? How can this be, on system with 512mb of ram and 256mb of swap? What the hell of memory does java address? I'm using amd64 version of sun-jdk-1.5.0.02, running as a server JavaVM. The system is amd64 with 64bit 2.6.11 gentoo-sources.
_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I?
Back to top
View user's profile Send private message
paulbiz
Guru
Guru


Joined: 01 Feb 2004
Posts: 508
Location: St. Louis, Missouri, USA

PostPosted: Sun Apr 24, 2005 2:40 am    Post subject: Re: Linux Memory Management or 'Why is there no free RAM?' Reply with quote

sapphirecat wrote:
The mysterious 880 MB limit on x86


Nice, I've just reclaimed around 128MB more ram :)

I always thought there was just something I didn't understand about how it measured my RAM, or my video ram or something was causing the number to be lower. I never looked at the "4 GB" option in the kernel config because I didn't have 4 GB of RAM. But, when I read the help, sure enough it said if you have between 1 GB to 4 GB use this option.

Thanks!
Back to top
View user's profile Send private message
sn99520
n00b
n00b


Joined: 11 Mar 2005
Posts: 17
Location: Slovakia

PostPosted: Mon Apr 25, 2005 4:14 pm    Post subject: what uses my RAM? Reply with quote

My box is up for 1 day and 19:28
OpenCA server was running on it and now I stopped everithig except X, firefox and urxvt to write this post.
I reallly stoped almost everithing, look:
Code:

 ps -A
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 ksoftirqd/0
    3 ?        00:00:00 events/0
    4 ?        00:00:00 khelper
    9 ?        00:00:00 kthread
   19 ?        00:00:00 kacpid
  117 ?        00:00:01 kblockd/0
  188 ?        00:00:00 pdflush
  189 ?        00:00:02 pdflush
  191 ?        00:00:00 aio/0
  190 ?        00:00:01 kswapd0
  193 ?        00:00:00 jfsIO
  194 ?        00:00:00 jfsCommit
  195 ?        00:00:00 jfsSync
  196 ?        00:00:00 xfslogd/0
  197 ?        00:00:00 xfsdatad/0
  198 ?        00:00:00 xfsbufd
  794 ?        00:00:00 kseriod
  865 ?        00:00:00 ata/0
  867 ?        00:00:00 scsi_eh_0
  868 ?        00:00:00 scsi_eh_1
  877 ?        00:00:00 reiserfs/0
  938 ?        00:00:00 udevd
 4571 ?        00:00:00 khubd
 5547 ?        00:00:00 dhcpcd
 6825 ?        00:00:02 syslog-ng
 6879 ?        00:00:00 acpid
 7178 ?        00:00:00 khpsbpkt
 7244 ?        00:00:00 knodemgrd_0
 9344 ?        00:00:00 sshd
 9384 ?        00:00:00 cron
 9563 ?        00:00:00 xfs
 9629 ?        00:00:00 xinetd
 9644 tty1     00:00:00 agetty
 9645 tty2     00:00:00 agetty
 9646 tty3     00:00:00 agetty
 9647 tty4     00:00:00 agetty
 9648 tty5     00:00:00 agetty
 9649 tty6     00:00:00 agetty
 9745 ?        00:00:00 xdm
31419 ?        00:00:28 X
31424 ?        00:00:00 xdm
31456 ?        00:00:00 Xsession
31502 ?        00:00:00 fluxbox
31518 ?        00:00:00 torsmo
31529 ?        00:00:00 mozilla-launche
31540 ?        00:00:26 firefox-bin
31943 ?        00:00:00 urxvt
31954 pts/0    00:00:00 bash
 2304 pts/0    00:00:00 ps


And look at my mem usage, this is "top" sorted by mem usage. I don't have problem with 186120k buffers, and 791204k cached.
But there is only 314868k free. I have 2 Gig RAM.
This means RAM Usage is 742 M. what uses so much RAM, if I stoped almost everithing???


Code:
top - 17:03:14 up 1 day, 19:26,  0 users,  load average: 0.04, 0.01, 0.00
Tasks:  50 total,   1 running,  49 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.3% us,  0.7% sy,  0.0% ni, 96.7% id,  0.0% wa,  0.3% hi,  0.0% si
Mem:   2056044k total,  1741176k used,   314868k free,   186120k buffers
Swap:   506036k total,        0k used,   506036k free,   791204k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                             
31419 root      15   0  126m  90m 2804 S  2.0  4.5   0:21.96 X                                                                                   
31540 steve     16   0 89932  28m  13m S  0.7  1.4   0:19.07 firefox-bin                                                                         
31943 steve     15   0 32584 5316 2408 S  0.0  0.3   0:00.24 urxvt                                                                               
31502 steve     15   0 28272 4468 2920 S  0.0  0.2   0:00.66 fluxbox                                                                             
 9563 xfs       16   0 15508 4084 1032 S  0.0  0.2   0:00.13 xfs                                                                                 
31424 root      16   0 24736 2336 1776 S  0.0  0.1   0:00.01 xdm                                                                                 
 9344 root      16   0 17072 1768 1392 S  0.0  0.1   0:00.07 sshd                                                                                 
31954 steve     15   0  8996 1540 1152 S  0.0  0.1   0:00.00 bash                                                                                 
 9745 root      16   0 17008 1292 1008 S  0.0  0.1   0:00.00 xdm                                                                                 
31529 steve     21   0  4820 1244  908 S  0.0  0.1   0:00.01 mozilla-launche                                                                     
 1559 steve     16   0 10432 1224  924 R  0.3  0.1   0:00.01 top                                                                                 
31456 steve     18   0  4560 1072  896 S  0.0  0.1   0:00.00 Xsession                                                                             
31518 steve     16   0  6652 1016  840 S  0.0  0.0   0:00.10 torsmo                                                                               
 9629 root      18   0 10828  968  776 S  0.0  0.0   0:00.00 xinetd                                                                               
 6825 root      16   0  6040  812  584 S  0.0  0.0   0:02.94 syslog-ng                                                                           
 9384 root      16   0  8952  760  620 S  0.0  0.0   0:00.00 cron                                                                                 
 9644 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 9645 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 9646 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 9647 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 9648 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 9649 root      16   0  3620  644  540 S  0.0  0.0   0:00.00 agetty                                                                               
 6879 root      24   0  2680  596  504 S  0.0  0.0   0:00.00 acpid                                                                               
    1 root      16   0  2556  548  460 S  0.0  0.0   0:00.83 init                                                                                 
 5547 root      11  -5  2568  512  428 S  0.0  0.0   0:00.00 dhcpcd                                                                               
  938 root      12  -5  2540  460  352 S  0.0  0.0   0:00.02 udevd                                                                               
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.03 ksoftirqd/0                                                                         
    3 root      10  -5     0    0    0 S  0.0  0.0   0:00.29 events/0                                                                             
    4 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 khelper                                                                             
    9 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread                                                                             
   19 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid                                                                               
  117 root      10  -5     0    0    0 S  0.0  0.0   0:01.37 kblockd/0                                                                           
  188 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush                                                                             
  189 root      15   0     0    0    0 S  0.0  0.0   0:02.73 pdflush                                                                             
  191 root      19  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0                                                                               
  190 root      15   0     0    0    0 S  0.0  0.0   0:01.69 kswapd0                                                                             
  193 root      25   0     0    0    0 S  0.0  0.0   0:00.00 jfsIO                                                                               
  194 root      25   0     0    0    0 S  0.0  0.0   0:00.00 jfsCommit                                                                           
  195 root      25   0     0    0    0 S  0.0  0.0   0:00.00 jfsSync                                                                             
  196 root      19  -5     0    0    0 S  0.0  0.0   0:00.00 xfslogd/0                                                                           
  197 root      19  -5     0    0    0 S  0.0  0.0   0:00.00 xfsdatad/0                                                                           
  198 root      15   0     0    0    0 S  0.0  0.0   0:00.01 xfsbufd                                                                             
  794 root      17   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                                                                             
  865 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0                                                                               
  867 root      16   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0                                                                           
  868 root      17   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                                                                           
  877 root      10  -5     0    0    0 S  0.0  0.0   0:00.03 reiserfs/0                                                                           
 4571 root      15   0     0    0    0 S  0.0  0.0   0:00.11 khubd                                                                               
 7178 root      15   0     0    0    0 S  0.0  0.0   0:00.00 khpsbpkt   


I,m sorry if answer to my question was already answered in this thread, but I did not find it.
Back to top
View user's profile Send private message
vyzivus
Apprentice
Apprentice


Joined: 05 Jul 2004
Posts: 173
Location: Slovakia

PostPosted: Tue May 10, 2005 6:58 am    Post subject: Reply with quote

I also had problems with memory consumption. They vanished after revdep-rebuild, so my guess is that multiple versions of libraries were used at once by binaries that didn't get recompiled. Don't know the exact reason though.
_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I?
Back to top
View user's profile Send private message
LordThunder
n00b
n00b


Joined: 03 Oct 2003
Posts: 4

PostPosted: Tue Oct 25, 2005 12:58 pm    Post subject: Reply with quote

t3gah wrote:
Thanks for the explanation.

What annoys me about the 'new' kernel is that it creates a swap file twice the size of the physical memory in the system. So if you have 1.5GB or more there is this HUGE waste of space on the system because the equation the kernel has ratio wise to the amount of physical memory versus what people who have that amount of memory in their system use it for cancels out what the actual user wants or needs. In essence, the user cannot disable this "feature" just like M$ because of whatever.

There is of course another issue that comes up with all those older systems and the memory management scheme of the new kernel is there to help make things smoother, but the whole Linux 'world' has become so bloated that you now have to have 128MB minimum according to many distro's for X to even start which is wrong because I've gotten around that.

I wish this explanation was on Linux.org on the main page and on every distro site out there so people can understand the why for's, etc.

Someone from fedoraforum.org gave me this link. Kudos to everyone. I have Gentoo on one of my systems. Sweet O/S. :)


Some remarks to this:

  • 1. The size of your swap partition is not at all determined by your kernel.

    The size is whatever you made it when partitioning your harddisk at the install of your system, so if it's 3gigs: blame your crappy distribution, not the kernel.

    In the old days the 'rule of thumb' was swapsize == 2x installed RAM ,but never larger than 128mb. I find that alof of people new to Linux are not aware of the second half of the rule. This made sense when you had computers with <=64 mb RAM installed. On top of that, the kernel didn't even support larger swapsizes than 128mb anyway, even if you made partition that was larger than that (you could only circumvent that by adding more swappartitions). If you have a regular modern system, you basically have to eyeball the swapsize and adjust it to whatever you think you want to have as extra 'breathingspace'. I usally reserve between 128 and 512mb. I would recommend to always have at least some swapspace. Actually, historically some parts of the system had issues with the swapsize being zero, so I guess it's also good way to avoid any of those issues that may linger.

  • 2. The required memory of today's ditributions is mainly governed by the fact you use 'bloated' desktop environments. KDE and Gnome both load alot of resident libraries and services that eat away from your memory like there is no tomorrow; It's the price you pay for the 'integration', ease of use and mostly, the eyecandy.

    If you wish to run a lighter desktop, try use other windowmanagers like windowmaker, fvwm2, fluxbox etc., which have a significantly smaller memory footprint.


Kind regards,
-- Lord Thunder (using Linux since 1994)
Back to top
View user's profile Send private message
spindle
Apprentice
Apprentice


Joined: 01 Dec 2003
Posts: 245

PostPosted: Sat Nov 19, 2005 1:41 am    Post subject: Reply with quote

Excellent excellent writeup. Very informative. Cleared up a few things for me.
Back to top
View user's profile Send private message
trinite
n00b
n00b


Joined: 14 Sep 2004
Posts: 32

PostPosted: Thu Dec 14, 2006 2:08 pm    Post subject: memory problems Reply with quote

Having lately some memory problems with one of my servers. After running for about a week, all my memory and swap are in use, slowing down performance / killing apps.

The server is a little bit short on memory (512 M RAM, an 1 G swap) and is running apache, php, courier-imap (pop3, imap, imap-ssl), qmail, spamassassin, clamav, vsftpd and ssh).

free gives the following output:
Code:
# free
             total       used       free     shared    buffers     cached
Mem:        512740     505536       7204          0       4064      10248
-/+ buffers/cache:     491224      21516
Swap:       979956     979956          0


top:
Code:
top - 14:55:59 up 29 days,  4:34,  1 user,  load average: 4.01, 2.95, 1.80
Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.1% us,  0.0% sy,  0.0% ni, 97.8% id,  1.1% wa,  0.0% hi,  0.0% si
Mem:    512740k total,   506040k used,     6700k free,     4624k buffers
Swap:   979956k total,   979956k used,        0k free,    15808k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4942 root      16   0  265m  60m  180 S  0.0 12.1   0:56.15 authdaemond
 4943 root      16   0  261m  60m   64 S  0.0 12.0   0:55.22 authdaemond
 4946 root      16   0  260m  59m  348 S  0.0 11.9   0:55.56 authdaemond
 4944 root      16   0  261m  59m  192 S  0.0 11.9   0:55.58 authdaemond
 4945 root      16   0  259m  58m   72 S  0.0 11.6   0:54.89 authdaemond
32224 root      16   0 61800  57m 1000 S  0.0 11.4   0:48.56 spamd
32225 root      17   0 56284  51m  856 S  0.0 10.4   0:04.11 spamd
32112 root      16   0 53356  49m  996 S  0.0  9.8   0:03.49 spamd
 4815 root      16   0 58536  16m  232 S  0.0  3.4  20:53.05 clamd
 4444 mysql     17   0  140m 4564 1244 S  0.0  0.9   2:56.12 mysqld
 7725 apache    16   0  224m 4068 1184 S  0.0  0.8   0:02.00 apache2
 1583 root      17   0  6884 3668  520 S  0.0  0.7   0:00.15 qmail-scanner-q
 5354 root      16   0  3556 3556 2584 S  0.0  0.7   0:02.16 ntpd
14590 root      16   0  6572 3364  448 S  0.0  0.7   0:03.16 gds_inet_server
 7723 apache    16   0  223m 3332  576 S  0.0  0.6   0:02.30 apache2
13958 root      16   0  6568 3232  456 S  0.0  0.6   0:03.93 gds_inet_server
23925 root      16   0  6764 1836  492 S  0.0  0.4   0:02.26 apache2
 7722 apache    18   0  6392 1740  300 S  0.0  0.3   0:00.00 apache2
  933 root      15   0  6164 1040  660 S  0.0  0.2   0:00.19 sshd
 1804 root      16   0  2080  988  720 R  0.4  0.2   0:00.18 top
  948 admin     16   0  6328  956  548 S  0.0  0.2   0:00.32 sshd
  949 admin     15   0  2796  844  544 S  0.0  0.2   0:00.00 bash
  961 root      17   0  2536  840  540 S  0.0  0.2   0:00.03 bash
  954 root      16   0  2160  760  548 S  0.0  0.1   0:00.00 su
 1582 qmaild    15   0  2764  604  432 S  0.0  0.1   0:00.00 qmail-smtpd
 5827 root      16   0  2100  584  508 S  0.0  0.1   0:02.76 xinetd
 5751 root      16   0  2956  528  488 S  0.0  0.1   0:00.23 vsftpd
 5901 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5902 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5903 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5904 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5905 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5908 root      16   0  1492  516  512 S  0.0  0.1   0:00.00 agetty
 5679 root      17   0  1704  492  452 S  0.0  0.1   0:00.34 cron
32177 qmaild    16   0  1512  492  424 S  0.0  0.1   0:00.10 tcpserver
32181 qmails    16   0  1488  460  380 S  0.0  0.1   0:00.19 qmail-send
  812 root      15   0  1536  436  392 S  0.0  0.1   0:18.07 couriertcpd


As you can see, the load averages are also much to high, which might be caused by the memory shortage?

Does anyone know what happens to all my memory?

Tnx in advance!

Btw, it is a P4 2400.
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Thu Dec 14, 2006 4:51 pm    Post subject: Reply with quote

Read http://gentoo-wiki.com/FAQ_Linux_Memory_Management and post 1155852.

About load average: 15-min load average seems to be ok (1.80).
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sat Dec 16, 2006 11:24 am    Post subject: Reply with quote

merged above two posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Jan 28, 2007 12:08 am    Post subject: Reply with quote

Split off topic "Ubuntu memory management and lag issues".
Back to top
View user's profile Send private message
Evincar
Apprentice
Apprentice


Joined: 13 Feb 2007
Posts: 217
Location: Madrid

PostPosted: Thu Feb 22, 2007 12:04 pm    Post subject: Thanks!! Reply with quote

Excellent explanation!! I was wondering why I always had only about 60MB free. And it kinda puzzled me that the system stayed responsive nevertheless. In XP, whenever my mem usage goes to 800 MB or so, I am toast :(.

I would say this should be a sticky or part of the FAQ!
Back to top
View user's profile Send private message
Auswaschbar
n00b
n00b


Joined: 15 Feb 2007
Posts: 2

PostPosted: Thu Feb 22, 2007 5:51 pm    Post subject: Reply with quote

I have another question:
Because i have 1280mb of ram in my notebook, but didn't want the highmem-overhead I set the 2g/2g user/kernel memory split (I use kernel 2.6.20, in older ones there is no such options I think). Now it recognizes and uses all of the ram. I only wonder if there are any disadvantages of this method?!?
Back to top
View user's profile Send private message
achlice
n00b
n00b


Joined: 20 Feb 2008
Posts: 6

PostPosted: Wed Feb 20, 2008 9:30 am    Post subject: Reply with quote

really did a good job ,i mean ,the editer~~
_________________
just do it ~~
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Wed Feb 20, 2008 10:36 am    Post subject: Reply with quote

vyzivus wrote:
Hello,
- RES is amount of memory that the process physically occupies. So if I sum up all processes RES I get memory reported as 'used' by 'free' in '-+buffers/cache' section?

The sum will be different. In memory management everything is more complicated as it looks. (For example, some memory is shared between more processes, some memory is used for kernel and not for any process, and there are millions of other possibilities.)

vyzivus wrote:

Code:

  PID  VIRT  RES  SHR %CPU %MEM    TIME+  SWAP CODE DATA COMMAND
26191 1507m 182m  58m  0.0 18.1   0:40.73 1.3g   52 1.3g java

Here, java takes 1,3GB of SWAP space?? How can this be, on system with 512mb of ram and 256mb of swap? What the hell of memory does java address? I'm using amd64 version of sun-jdk-1.5.0.02, running as a server JavaVM. The system is amd64 with 64bit 2.6.11 gentoo-sources.


Top calculates SWAP as VIRT-RES. This is not the correct way to calculate swap usage of a process. (Once again: In memory management everything is more complicated as it looks.) I don't know the correct way.

Java is very good at taking large amounts purely virtual memory (memory which is unused and physically stored nowhere). Large part of that 1.5GB doesn't take any space in RAM or on disk.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum