Author Topic: What's the difference between free RAM and memory  (Read 2466 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
What's the difference between free RAM and memory
« on: November 08, 2004, 04:20:50 pm »
Hi:

I thought the more free RAM you have on the Z the more free memory the programs have to run.

However while when I do df I get
Code: [Select]
/dev/mtdblock3     96256   14148     82108    15%    /homethis is the line that refers to free RAM right?

But then when I do free I get
Code: [Select]
Mem:     total  62112      used  60660      free  1452Why? Why isn't it 80Meg?

I thought installing progs to SD means there's gonna be more free memory to run them. So why do I keep running out of mem, when there's 80 Meg free on internal flash?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

stupkid

  • Hero Member
  • *****
  • Posts: 578
    • View Profile
    • http://
What's the difference between free RAM and memory
« Reply #1 on: November 08, 2004, 04:34:05 pm »
df is reporting the amount of free Internal Flash and External Storage (CF, SD, USB storage, etc.).  This is not the same as Physical memory.  Think of the 'df -h' output as how much free disk space you have where as  'free' will tell you how much free RAM memory you have available to run applications.

The Zaurus is not like Palm OS which executes code in place.  The Z functions more like a traditional OS which reads data from storage media into memory and then executes the code.

Zaurus SL-C3200 pdaXii13v2 5.5 / Ambicom WC1100C-CF / Socket Bluetooth Rev G


OpenMoko FreeRunner - Running Tweaked OM2008.x Image

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
What's the difference between free RAM and memory
« Reply #2 on: November 08, 2004, 04:49:34 pm »
So does it make sense to install progs to SD, like I have done so that you have more mem to run progs. From what you sap I'd think I shouldn't even bother and just install them to internal flash, right?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

stupkid

  • Hero Member
  • *****
  • Posts: 578
    • View Profile
    • http://
What's the difference between free RAM and memory
« Reply #3 on: November 08, 2004, 05:08:33 pm »
No, installing to SD is a good idea since flash memory only has so many writes before it fails.  It is better to have your SD card with bad sectors than your internal flash, which is not easily replaced.  I also recommend putting database, swap files, etc. onto external storage for the same reason.  On my Z I have moved /home/tmp to my SD card to reduce writes.
« Last Edit: November 08, 2004, 05:11:06 pm by stupkid »

Zaurus SL-C3200 pdaXii13v2 5.5 / Ambicom WC1100C-CF / Socket Bluetooth Rev G


OpenMoko FreeRunner - Running Tweaked OM2008.x Image

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
What's the difference between free RAM and memory
« Reply #4 on: November 09, 2004, 07:58:15 am »
On the SL-CXXX, SL-5600, and SL-6000, installing to SD definitely does *not* give you more memory to run programs. So if you have the space available, installing programs to internal flash instead of SD is a perfectly reasonable thing to do. Any free internal flash is, in essence, wasted since it can't be used for anything except storage. The wear limit in internal flash is on the order of 100K cycles per sector so it's *highly* unlikely that you will ever wear out internal flash sectors by just installing programs. Swap files, databases, frequently changed documents, etc. are a different story and keeping them on a memory card is a pretty good idea.

Now, one good reason to install stuff to SD and preserve internal flash space (assuming you're running a Sharp or Sharp-compatible ROM) is that there are some programs that will *only* install to internal flash memory. Typically, server type applications (apache, mysql, etc.) and libraries need to be in internal memory. If internal memory is filled with stuff that would work just as well on CF or SD and you run across an app that must be installed to internal, you're out of luck.

My rule of thumb is that if an app is a fundamental part of how I typically use the Zaurus it goes to internal flash. If it's just a convenience or nice to have, it goes to SD (assuming it will install there without issues).

Newbix

  • Newbie
  • *
  • Posts: 15
    • View Profile
What's the difference between free RAM and memory
« Reply #5 on: November 09, 2004, 11:35:53 pm »
Quote
But then when I do free I get
Code: [Select]
Mem:     total  62112      used  60660      free  1452

Just to complete the other responses, it is perfectly normal to have your RAM allmust full. A reasonnable OS uses the RAM to keep the latest data you have read from the hard drive (or some other kind of slow acces storage, ie the internal flash or a SD/CF card for the Zaurus) in case you need them a second time. This speeds up the thing, and of course if some app needs more RAM this cache is freed.

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
What's the difference between free RAM and memory
« Reply #6 on: November 10, 2004, 09:31:53 am »
Do you have a lot of programs on fastload?  Disabling fasload would help your memory.
« Last Edit: November 10, 2004, 09:32:30 am by bluedevils »
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)