low on memory

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

low on memory

Postby gregd72002 » Fri May 11, 2012 11:01 am

Hi,

When playing around with the board I realised the amount of memory (256mb) is not enough for some bigger tasks, i.e. OpenELEC compilation, git clone of some bigger repositories, etc.. This is reported in dmesg as well as the process gcc or git crashes half way through.

Adding swap file (preferably on external hdd) as described in http://archlinuxarm.org/support/guides/ ... g-swapfile seems to improve this. So does setting swampiness to very low though the tradeoff is overall performance and responsiveness when using swap.

Since this is not a perfect solution (swap file is fairly slow) I'm trying to establish the minimum size of the swap file to use. Currently, mine is set to 256mb.
So how can I find out how much of these 256mb are currently allocated by my running processes? This will allow me to decrease the size of the swap file to absolutely minimum and hopefully improve slightly performance?
gregd72002
 
Posts: 15
Joined: Wed May 09, 2012 2:57 pm

Re: low on memory

Postby pepedog » Fri May 11, 2012 11:12 am

1 Gb swap, and get another 100Mb of ram while compiling by renaming the 224 file in /boot to start.elf (reboot to take effect.
One possible hiccup, on my arch x86-64 on an i7, it tries linking to an x86 binary while producing libblkid. Possibly it will link in a soft float version while compiling on a pi?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: low on memory

Postby gregd72002 » Fri May 11, 2012 11:38 am

Right, this is getting interesting...

what's the purpose of the 4 elf files and what are the differences between them?
start.elf, arm128_start.elf, arm192_start.elf, arm224_start.elf

From what you are saying start.elf if a copy of arm128_start.elf ... hmmm md5sum confirms it.

Why would they do it?


Re hiccup... I do not think I will have this problem as all the compilation is on the board itself (no x86 binaries)..
gregd72002
 
Posts: 15
Joined: Wed May 09, 2012 2:57 pm

Re: low on memory

Postby gregd72002 » Fri May 11, 2012 11:49 am

I think I will answer my own question.

start.elf is the one the system uses and it is always a copy of one of the following:
- arm128_start.elf (128mb ram and remaining gpu memory)
- arm192_start.elf (192mb ram and remaining gnu memory)
- arm224_start.elf (224mb ram and remaining gnu memory)

based on http://www.raspberrypi.org/phpBB3/viewt ... f=6&t=5467

Command to check you current memory/swap details: free -m
gregd72002
 
Posts: 15
Joined: Wed May 09, 2012 2:57 pm

Re: low on memory

Postby pepedog » Fri May 11, 2012 12:42 pm

Yes, exactly.

It's worth a punt but if a soft float item is linked in there could be problems, but try it anyway
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: low on memory

Postby gregd72002 » Fri May 11, 2012 7:50 pm

with 224_start.elf this works now much better!
How would I go about creating arm256_start.elf?

I do not need any video/framebuffer at all - I'm doing all my work from the level of ssh...
gregd72002
 
Posts: 15
Joined: Wed May 09, 2012 2:57 pm

Re: low on memory

Postby pepedog » Fri May 11, 2012 7:57 pm

Somewhere on the pi forum, someone compared bytes of the 3 files, and found how to do this. Remember it appeared quite easy to do. Is it worth it for extra 30 Mb
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: low on memory

Postby gregd72002 » Fri May 11, 2012 8:55 pm

Right.. found it: http://www.raspberrypi.org/forum/featur ... -3/#p66519

but it looks like the 256MB variant is still to be tested. It seems like the link above contains all information needed to do it.
gregd72002
 
Posts: 15
Joined: Wed May 09, 2012 2:57 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests