Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


RAM Impact
#1
Has anyone compared differing amounts of RAM in a Raspberry Pi, say 1, 2, or 4 GB versus say 8?  Further has anyone compared the sound of a CM3 module in an Allo USBridge - Signature with something like 1GB to say something like 8GB in a module?
Reply
#2
My Pi Zero with 512MB RAM runs at about 34% used. My Pi4 with 2GB RAM runs at about 11% used. Plenty of overhead in both systems and I don't think RAM is ever enough of a constraint within moOde to begin affecting anything.
----------------
Robert
Reply
#3
Code:
S Y S T E M   P A R A M E T E R S

moOde release = 7.3.0 2021-06-25
RaspiOS = 10.6
Linux kernel = 5.4.77-v7l+ #1371
Platform = Pi-4B 1.2 4GB
...
Memory free = 3534 MB
Memory used = 91 MB
SoC temperature = 39.4°C

As you can see from the excerpt above, spending $20 extra to get 4GB RAM instead of 2GB RAM was a real genius move on my part {/sarcasm}. Idling, moOde is using less than 100MB.  Playing a 24/96 ALAC track, it's using less than 200MB.

Mine is pretty barebones.  The local display is disabled.  Airplay, Spotify, and Squeezelite renderers are disabled, as is WiFi (it's hardwired Ethernet).  Basically, it's the web serving of the moOde interface, reading from a USB disk, and feeding samples out to a USB DAC.  That's it.

I'm sure that I could find ways to make moOde use some more RAM, but I'm probably going to downsize to a 2GB Pi-4B for moOde and repurpose the 4GB Pi-4B for a public-facing web server (that I am currently running on a Pi-3B+).
Cheers,
  Miss Sissy Princess
Reply
#4
"S Y S T E M P A R A M E T E R S

moOde release = 7.3.0 2021-06-25
RaspiOS = 10.6
Linux kernel = 5.4.77-v7+ #1371
Platform = Pi-3B 1.2 1G
...
Memory free = 105 MB
Memory used = 144 MB
SoC temperature = 42.9°C"

that what I get on my Pi3B
a 2GB version seems more suitable
musical regards

y.
Reply
#5
Careful, folks.

You're looking at the output of commands which don't show how much memory has been sequestered dynamically by RaspiOS for buffers and caches. This number can increase and decrease according to internal algorithms and obscure RaspiOS settings.

Try instead, for example, the free command to get a truer picture of how much memory moOde is consuming. Here, on a 1GB RPi 4B,

Code:
pi@moode:~ $ free
             total        used        free      shared  buff/cache   available
Mem:         875060      109760      102620       13168      662680      691012
Swap:             0           0           0



Buffer space is reclaimable as processes demand more memory (aka "memory pressure"), so it's the last column which really counts.

Regards,
Kent

PS - there are options which prettify the free output in units ranging from bytes (default) to petabytes.
Reply
#6
I should prolly change sysinfo to use the same memory calc as moodeutl -m instead of used and free from the "free" command. Moodeutl uses the data from /proc/meminfo

Code:
pi@rp1:~ $ cat /proc/meminfo
MemTotal:         947048 kB
MemFree:          519572 kB
MemAvailable:     719616 kB
Buffers:           70932 kB
Cached:           186360 kB
SwapCached:            0 kB
Active:           259620 kB
Inactive:          96636 kB
Active(anon):     102360 kB
Inactive(anon):    21772 kB
Active(file):     157260 kB
Inactive(file):    74864 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                36 kB
Writeback:             0 kB
AnonPages:         99132 kB
Mapped:            78464 kB
Shmem:             25172 kB
KReclaimable:      25952 kB
Slab:              45604 kB
SReclaimable:      25952 kB
SUnreclaim:        19652 kB
KernelStack:        1568 kB
PageTables:         5652 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      473524 kB
Committed_AS:     810372 kB
VmallocTotal:    1114112 kB
VmallocUsed:        7028 kB
VmallocChunk:          0 kB
Percpu:              464 kB
CmaTotal:          65536 kB
CmaFree:           63112 kB
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
(08-10-2021, 11:50 AM)TheOldPresbyope Wrote: Try instead, for example, the free command to get a truer picture of how much memory moOde is consuming. 

I did free, cat proc/meminfo, and moOde's internal reporting (which I now understand uses the latter).  I went with the built-in reporting because I didn't want to include memory in use for the SSH session.

Linux memory usage and reporting remains a rather squishy subject to me, with processes asynchronously kicking off, shutting down, requesting, and giving back RAM -- it seems sometimes based on how much they see free (trying to be good citizens?).  

With the smallest amount of RAM on a Pi 4 being 2GB, it looks like moOde is typically using an order of magnitude less when configured as I have mine.  As I wrote, I'm sure that I could find plenty of ways to make it use more, but I can't envision hitting the 2GB mark without some kind of artificial effort to do so.
Cheers,
  Miss Sissy Princess
Reply
#8
The way Linux manages memory is actually very well defined. Below is link to the classic explain.
https://www.linuxatemyram.com
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
(08-11-2021, 06:42 PM)Tim Curtis Wrote: The way Linux manages memory is actually very well defined. Below is link to the classic explain.
https://www.linuxatemyram.com

Thanks, but what makes it "squishy" is that results are not repeatable because of "processes asynchronously kicking off, shutting down, requesting, and giving back RAM."  I used "free" five
times in a row on my otherwise idle moOde server and got five different results (obviously total RAM stayed the same, but used, free, buff/cache, and available all varied).  Free RAM varied by 764KB between runs.
Cheers,
  Miss Sissy Princess
Reply
#10
Sounds normal.

You can see detailed memory utilization by using the "watch" command.

Code:
watch -n .2 "cat /proc/meminfo"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: