-1

EDIT

this apprears to be a software issue. I booted another RPI with a fresh OS and it showed 1GB of ram. I then booted it off the HDD that I am using for the other rpi and it showed that there was only 114MB of ram. Still not even sure where to look.

Original Post

I am trying to figure out if I screwed something up. I have a 3B+, which says it has 1GB LPDDR2 SDRAM on the spec page (https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/). However, while looking at htop one day, I noticed it said 114M of ram... and free agrees. I am assuming 1GB of ram means one billion bytes and not bits, seeing that capitol B.

I checked on my raspberry pi 3B, and indeed that one says it has 926M available, so I'm not going totally crazy.

It keeps dumping things to swap, which is slowing things down a ton. Below are all the details that I can think to give.

$ free -h 
              total        used        free      shared  buff/cache   available
Mem:           113M         65M         29M         32K         18M         14M
Swap:          1.2G        231M        1.0G

I made a tmpfs disk with 100MB of storage, and I am trying to figure out if I screwed something up when I made this.

I also see I have a bunch of tmpfs when I run df , but my understanding is they only use the ram that is being stored in them, and do not block off everything else.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       110G  9.4G   97G   9% /
devtmpfs         53M     0   53M   0% /dev
tmpfs            57M  8.0K   57M   1% /dev/shm
tmpfs            57M  6.6M   51M  12% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            57M     0   57M   0% /sys/fs/cgroup
tmpfs           100M  3.5M   97M   4% /home/pi/webpage/rtmp
/dev/sda1        44M   39M  4.7M  90% /boot
tmpfs            12M     0   12M   0% /run/user/1000

here is the /etc/fstab file

$ cat /etc/fstab
tmpfs           /home/pi/webpage/rtmp           tmpfs defaults,nodev,exec,mode=1777,size=100M,uid=pi,gid=www-data 0        0
proc            /proc           proc    defaults          0       0
PARTUUID=82ca2376-01  /boot           vfat    defaults          0       2
PARTUUID=82ca2376-02  /               ext4    defaults,noatime  0       1
swap_file  swap   swap   defaults   0 0
jeffpkamp
  • 121
  • 1
  • 10

2 Answers2

0

There is a config file in raspian (/boot/config.txt) that sets a number of system configuration items, including memory config.

If you can run raspi-config you can go through the settings and change it. Look under advanced options -> memory split and adjust that and see if it helps.

See also How can I change the RAM split?

user10489
  • 1,001
  • 1
  • 6
  • 11
0

It turns out there were some files in the /boot folder that needed to be fixed. The Start*elf and fixup*dat files were incorrect. This was from moving the OS image up from an older RPI model (B+ or 3, can't remember). By replacing those files with the correct ones from the github repository for the firmware (https://github.com/raspberrypi/firmware) I was able to get it working. Credit goes to "cleverca22" over at the RPI forums. You can read our thread working through it here. https://forums.raspberrypi.com/viewtopic.php?p=2016025#p2016025

jeffpkamp
  • 121
  • 1
  • 10