Memory reduced - faulty memory or config?

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

Memory reduced - faulty memory or config?

Postby funkyboris » Tue Jul 01, 2014 1:53 pm

Hi guys

After a recent update my Raspberry Pi Model B suddenly no longer sports the famous 512MB of RAM. Running free -m yields:
$this->bbcode_second_pass_code('', ' total used free shared buffers cached
Mem: 184 84 100 0 10 39
-/+ buffers/cache: 34 150
Swap: 511 0 511
')
I have looked at dmesg in order to find out what happened. Here is the line that says something about memory:
$this->bbcode_second_pass_code('', 'Memory: 180968K/200704K available (6128K kernel code, 331K rwdata, 2096K rodata, 245K init, 858K bss, 19736K reserved)')
I have trided to boot the SD card with Arch on another Rpi to see whether this is a hardware issue. Same result. This would seem to indicate that this is specific to some configuration inside of Arch Linux.

Any ideas as to where to look for the setting that does this or what to do about it?
funkyboris
 
Posts: 8
Joined: Thu Mar 20, 2014 7:20 pm

Re: Memory reduced - faulty memory or config?

Postby moonman » Tue Jul 01, 2014 7:50 pm

There was another post about this, though i haven't experienced this myself (or maybe i didnt notice). Try playing with gpu_mem (not 256 or 512 variants, comment them out)
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Memory reduced - faulty memory or config?

Postby funkyboris » Wed Jul 02, 2014 12:15 pm

$this->bbcode_second_pass_quote('moonman', 'T')here was another post about this, though i haven't experienced this myself (or maybe i didnt notice). Try playing with gpu_mem (not 256 or 512 variants, comment them out)

gpu_mem certainly seems to be the right setting to be playing with. That took me to the following page describing the settings in the /boot/config.txt:

http://www.raspberrypi.org/documentation/configuration/config-txt.md

The page also describes the cpu_mem setting.

I seem to remember that I, prior to my latest running of pacman -Suy, had the full 512MB space available for allocation by the system. There does not seem to be any consensus as to what the setting should ideally be. On top of that there is the possibility of using the Contiguous Memory Allocator (CMA) that dynamically manages the partitioning of memory between system and GPU. There is, however, not even consensus as to whether this should work at all. According to this thread, CMA is not supported on raspberry pi:

https://github.com/raspberrypi/linux/issues/503

I have, however had success so far with running with the following config.txt:

$this->bbcode_second_pass_code('', 'cma_lwm=16
cma_hwm=64
cma_offline_start=16')
thus leaving the cpu_mem, cpu_mem_512 and cpu_mem_256 commented out and thus at their default.

Output of free -m:
$this->bbcode_second_pass_code('', ' total used free shared buffers cached
Mem: 462 96 366 0 11 49
-/+ buffers/cache: 35 427
Swap: 511 0 511
')
Output of dmesg | grep Memory:
$this->bbcode_second_pass_code('', '[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Memory: 436520K/487424K available (6128K kernel code, 331K rwdata, 2096K rodata, 245K init, 858K bss, 50904K reserved)')
This seems to work.

There is a lot of more discussion on the topic here:
http://www.raspberrypi.org/forums/viewtopic.php?f=53&t=31819

Happy tinkering!
funkyboris
 
Posts: 8
Joined: Thu Mar 20, 2014 7:20 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 17 guests