-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
6
  • Have you tried replacing the sd card with another one with a fresh OS installed in it? If you can try that, then we can eliminate whether it's an hardware problem or software problem
    – stormfire
    Jun 29 at 20:15
  • I'm in the process. I have another 3B+ that I am going to move the hard drive over to, and see if if the problem persists
    – jeffpkamp
    Jun 29 at 20:21
  • It appears to be a software issue. Moving the hard drive to a different rpi also showed the same reduced memory, but when ti was booted with a fresh os it showed the 1GB of memory.
    – jeffpkamp
    Jun 29 at 21:03
  • Why not just reflash the hard disc?
    – CoderMike
    Jun 30 at 5:10
  • well, it is currently hosting a webpage for an organization that is having a sign up and registration. I need it to run smoother, but I can't shut it down entirely with out having something in place to replace it... :/ and I am really curious what the heck I did to break it this way too.
    – jeffpkamp
    Jun 30 at 5:42

2 Answers 2

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?

3
  • I did look at this, as it sounded like it could be the difference. It was set to the same value as the OS with the normal RAM numbers. This is really strange...
    – jeffpkamp
    Jun 30 at 5:40
  • Okay... I just tried this and I set it to 16 (lowest vram amount listed) with raspi-config. Now I have 224MB free. I have no idea how to set it to give me the other 75% of my memory. I tried adding total_mem=1024 to config.txt but no joy
    – jeffpkamp
    Jun 30 at 5:57
  • I think editing the config file is not enough, you really need to change it with raspi-config. There may be other things that use the memory that can be configured in raspi-config as well.
    – user10489
    Jun 30 at 11:13
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.