How much of RAM is free?

Booting, installing, newbie
Message
Author
hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

How much of RAM is free?

#1 Post by hoven »

How do I tell how much RAM is still free?

If I look at "df -h" I see what's allocated to different things but I can't see how to add everything up.

If I look at "free" it seems to be a rubbish number as there is always something free but the "used" amount has no correlation to what I think is being used.

Freememapplet is just weird.

sfeeley
Posts: 812
Joined: Sun 14 Feb 2010, 16:34

#2 Post by sfeeley »

click console

type "htop"

I think this will give you what you want-- basically how much ram and swap is being used, plus a table of what is using it. also cpu usage

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

#3 Post by hoven »

sfeeley wrote: type "htop"
Thanks, but no good. It's showing 130MB used when it's actually more like 1,400MB used. Otherwise htop is great, although I don't think it's in the standard Puppy, but it should be instead of that useless top and pprocess.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#4 Post by Béèm »

Why don't you post a screenshot, so people can see for themselves if it's no good.
Also machine specs are welcome.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

#5 Post by hoven »

Where's the trust? :(

Htop currently showing 137MB/2023MB.

Pupsfs is in RAM so at least another 212MB

/initrd/pup_rw 75MB (Ridiculous recent Firefoxes waste 50MB before you even start).

Plus another 967MB in tmpfs.

"free" shows 2057704 used and 14868 free.

The way I figure it, there is about 600MB of RAM which is still available to use.

Code: Select all

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb2             2.6G  2.3G  160M  94% /initrd/mnt/dev_save
/dev/loop1            248M   93M  156M  38% /initrd/pup_ro1
tmpfs                1012M   75M  938M   8% /initrd/pup_rw
tmpfs                 213M  212M  784K 100% /initrd/mnt/tmpfs
/dev/loop0            212M  212M     0 100% /initrd/pup_ro2
unionfs              1012M   75M  938M   8% /
shmfs                 448M     0  448M   0% /dev/shm
tmpfs                1012M  967M  45M  95% /mnt/sdzz

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#6 Post by Béèm »

Why don't trust htop then.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: How much of RAM is free?

#7 Post by jpeps »

hoven wrote:How do I tell how much RAM is still free?

If I look at "df -h" I see what's allocated to different things but I can't see how to add everything up.

If I look at "free" it seems to be a rubbish number as there is always something free but the "used" amount has no correlation to what I think is being used.

Freememapplet is just weird.
Did you add what's in the buffers?

Jasper

#8 Post by Jasper »

Hi hoven,

I raised a similar question to yours http://www.murga-linux.com/puppy/viewto ... 47&t=64458 where I even emailed the author of Htop.

I am still in a very dim light, but the good news is that with 640 MB of total RAM (597 MB available per Htop which could be increased to 621 MB) I have a 1GB swap partition which is not needed and usually set to off with "swapoff -a"
and I have yet to come anywhere near using all my RAM despite trying a few times many months past.

My regards

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

#9 Post by hoven »

Béèm wrote:Why don't trust htop then.
It's not a matter of trusting it. Htop simply does not report the amount of RAM in use or available.

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

Re: How much of RAM is free?

#10 Post by hoven »

jpeps wrote:
hoven wrote: If I look at "free" it seems to be a rubbish number as there is always something free but the "used" amount has no correlation to what I think is being used.
Did you add what's in the buffers?
Not sure what you mean. Currently "free" shows different figures to what it showed before even though nothing has changed memory usage since then.
total 2072572
used 2021112
free 51460
shared 0
buffers217344
no swap

But I know free RAM is close to 650MB (through trial and error)

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#11 Post by Béèm »

In PupSysInfo you'll find full detail of the RAM occupation.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: How much of RAM is free?

#12 Post by jpeps »

hoven wrote:
jpeps wrote:
hoven wrote: If I look at "free" it seems to be a rubbish number as there is always something free but the "used" amount has no correlation to what I think is being used.
Did you add what's in the buffers?
Not sure what you mean. Currently "free" shows different figures to what it showed before even though nothing has changed memory usage since then.
It's my understanding that memory will be allocated for various purposes such as speed. Therefore "free" may be misleading.

Also, I can substantially add free memory by just clearing the caches:

Code: Select all

sync
sleep 1
echo 3 > /proc/sys/vm/drop_caches

Mem: total......used.....free.....shared buffer

Mem: 1034512 851796 182716 0 109148
Mem: 1034512 303780 730732 0 1776

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

Re: How much of RAM is free?

#13 Post by rjbrewer »

hoven wrote:
jpeps wrote:
hoven wrote: If I look at "free" it seems to be a rubbish number as there is always something free but the "used" amount has no correlation to what I think is being used.
Did you add what's in the buffers?
Not sure what you mean. Currently "free" shows different figures to what it showed before even though nothing has changed memory usage since then.
total 2072572
used 2021112
free 51460
shared 0
buffers217344
no swap

But I know free RAM is close to 650MB (through trial and error)
Type "top" in console;
it's even more fun than "htop" or "free". :wink:

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

Jasper

#14 Post by Jasper »

Hi,

In the screenshot there are 4 sets of Memory figures from htop, slickrun(via Wine), conky and top.

They are all in close agreement, but for "top" divide the final figures by 1024.

So per "top":
total = 490812 + 121312 = 612124 / 1024 = 597.77
used = 490812 -38176 - 344712 =107924 / 1024 = 105.39
free = 121312 +38176 + 344712 =504200 / 1024 =492.38


So superficially I understand, but not really or deeply.

My regards
Attachments
htopplus.jpg
Left > htop (with slickrun in blue then conky below). Right > top
(86.42 KiB) Downloaded 549 times

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

Re: How much of RAM is free?

#15 Post by hoven »

rjbrewer wrote: Type "top" in console;
it's even more fun than "htop" or "free". :wink:
Closer, but still no good.
Top currently showing 59MB free and 284MB buffers.

As near as I can gather there is actually 500-600MB of physical RAM that is still available for use. If I exceed that amount then system will freeze.

Jasper

#16 Post by Jasper »

If you have a (sufficient) swap file or partition (which appears unnecessary in your case) why do you think you will experience a freeze?

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

#17 Post by hoven »

Jasper wrote:If you have a (sufficient) swap file or partition (which appears unnecessary in your case) why do you think you will experience a freeze?
Because with no swap I do get a frozen system when I exceed the physical RAM. I can replicate it every time. None of the memory readouts that have been discussed here give a warning. Yet I can approximate the level at which it will occur by simple addition of what I think is occupying RAM.

Jasper

#18 Post by Jasper »

So, why not apply some gumption, make a swap file or partition, and report back?

If you followed the link in my first post above, the difference between us seems to be your real need, as opposed to my desire to merely understand.

hoven
Posts: 145
Joined: Mon 21 Jun 2010, 23:39

#19 Post by hoven »

I have, by starting this thread and asking the question. Swap is irrelevant. There should be a way to tell how much RAM is free.

With regards to your Htop issue, I have no reason to doubt that Htop reports its figures absolutely accurately. However, it does not report RAM usage, just like a normal clock does not report the temperature. Htop reports memory used by running processes but there are other users of memory, especially with a Puppy frugal install.
Last edited by hoven on Fri 18 Nov 2011, 00:56, edited 1 time in total.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#20 Post by Béèm »

hoven wrote:I have, by starting this thread and asking the question. Swap is irrelevant. There should be a way to tell how much RAM is free.
I have told you to look in PupSysIfo to have the RAM occupation.
Did you do that?

Also I have the impression you have a hidden agenda.
Why not tell why you want to know and why swap isn't an option.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

Post Reply