zram...? Raspberry Pi & Snakeoil
#1
zram vs swap.... seems easy to try and revert....
I don't think either are particularly needed as monitoring with top whilst playing seems to show the most hungry program being...top @14% CPU on one core.

Mpd is pretty low resource usage anyway and these days I am using an AK4137 re-sampler to convert to DSD256 either via xmos or I2S depending on player so no heavy re-sampling is needed by the o/s or player hardware and DSD is fed to an Ess DAC bypassing some of the Chip's filtering.

So, I will try some more listening tests using zram and see if I can notice any difference....
Any comments appreciated...

https://github.com/novaspirit/rpi_zram
Reply

#2
(24-Oct-2018, 05:02 PM)Bromf Wrote: zram vs swap.... seems easy to try and revert....
I don't think either are particularly needed as monitoring with top whilst playing seems to show the most hungry program being...top @14% CPU on one core.

Mpd is pretty low resource usage anyway and these days I am using an AK4137 re-sampler to convert to DSD256 either via xmos or I2S depending on player so no heavy re-sampling is needed by the o/s or player hardware and DSD is fed to an Ess DAC bypassing some of the Chip's filtering.

So, I will try some more listening tests using zram and see if I can notice any difference....
Any comments appreciated...

https://github.com/novaspirit/rpi_zram

swap is just there as a buffer in case my RESTful API messed up. So far it hasn't, but if it does at least there's something to fall back to. The good thing is if there's no issues, then the swap space will be enabled but not used. if you know what I mean.

An good  option is to have an option to turn off swap entirely. That may be worthwhile I think.

As for zram.. That's the first time I have heard of it.. Will try and research later what it is later on. Thumbs Up
Snakeoil Operating System - Music, your way!
Reply

#3
zram is a 'swap' space in ram using compression. It replaces a conventional swap space so reduce wear/usage for the Pi's sd-card and is much faster if and when it is used.
The linked github version for the Pi removes current swap and replaces it with zram swap calculated for the performance/cores of a Pi3 or better.

I've found no performance issues so far in testing.... though no obvious benefits yet either... Wink

https://www.kernel.org/doc/Documentation...v/zram.txt
https://www.cnx-software.com/2018/05/14/...able-zram/
Reply

#4
(25-Oct-2018, 05:25 AM)Bromf Wrote: zram is a 'swap' space in ram using compression. It replaces a conventional swap space so reduce wear/usage for the Pi's sd-card and is much faster if and when it is used.
The linked github version for the Pi removes current swap and replaces it with zram swap calculated for the performance/cores of a Pi3 or better.

I've found no performance issues so far in testing.... though no obvious benefits yet either... Wink
Ah, that brings back memories back in the DOS days.. A memory compressor.

(25-Oct-2018, 05:25 AM)Bromf Wrote: https://www.kernel.org/doc/Documentation...v/zram.txt
https://www.cnx-software.com/2018/05/14/...able-zram/
I'd see if I can get that support in. Chances are, it'd require a new kernel though.. Wiill explore this in time.
Snakeoil Operating System - Music, your way!
Reply

#5
From what I've read zram is merged into mainline kernel since 3.14....
Using the linked github install on RPi and when I run...
Code:
$ grep zram /proc/swaps
it returns...
Code:
/dev/zram0                              partition    236028    0    5
so appears to be enabled as default swap but unused currently as Pi3 and Snakeoil is using so very few resources.. Smile
[-] The following 1 user Likes Bromf's post:
  • agent_kith
Reply

#6
(25-Oct-2018, 06:16 PM)Bromf Wrote: From what I've read zram is merged into mainline kernel since 3.14....
Using the linked github install on RPi and when I run...
Code:
$ grep zram /proc/swaps
it returns...
Code:
/dev/zram0                              partition    236028    0    5
so appears to be enabled as default swap but unused currently as Pi3 and Snakeoil is using so very few resources.. Smile  
Run something intensive like JRiver and see more RAM gets consumed. To be fair this also likes a virtual desktop, hence the extra overheads. This is why I prefer MPD or LMS+Squeezelite.

Edit: To be even fairer I think I should be able to cut down the number of running processes too. From 1.x.x onwards I notice the number of processes running appear to be 2 to 4 times more than 0.1.x series. However, I guess because of the real time+force preemption kernel, it doesn't really matter as the process that requires CPU attention will always get it.

Hopefully I can revise the kernel and streamline it even more in the future.
Snakeoil Operating System - Music, your way!
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  Raspberry Pi 4 looks interesting. agent_kith 113 30,842 01-Nov-2023, 01:49 AM
Last Post: Luke 38
  Command line player announced for Ubuntu.... maybe for Snakeoil too ? Bromf 1 1,685 24-Nov-2017, 08:34 AM
Last Post: agent_kith
  Raspberry Pi and Hifiberry DAC Pro Chanh 4 4,762 30-Sep-2016, 12:55 PM
Last Post: Chanh



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
ZimaBoard 2x NIC, 2x SATA, 2x USB, 1x PC...
Last Post: agent_kith
26-Mar-2024 12:04 PM
» Replies: 13
» Views: 612
LMS Upgrade ?
Last Post: uglymusic
15-Mar-2024 09:14 PM
» Replies: 7
» Views: 149
Squeezebox shutdown
Last Post: TripleX
13-Mar-2024 07:34 AM
» Replies: 4
» Views: 70
MP3 Not Playing
Last Post: Coacharnold
10-Mar-2024 10:25 AM
» Replies: 3
» Views: 52
Fail to install myMPD
Last Post: hkphantomgtr
03-Mar-2024 08:45 PM
» Replies: 9
» Views: 195
Intel HFI Driver Can "Save Tons Of CPU C...
Last Post: hkphantomgtr
28-Feb-2024 09:15 PM
» Replies: 0
» Views: 41
Announcing Snakeoil Measurements 1.3.0
Last Post: agent_kith
26-Feb-2024 10:02 PM
» Replies: 94
» Views: 4137
More Problems with Squeezelite in 1.3
Last Post: Coacharnold
17-Feb-2024 09:47 PM
» Replies: 2
» Views: 69
Snakeoil Music server & Snakeoil its own...
Last Post: Snoopy8
17-Feb-2024 11:20 AM
» Replies: 8
» Views: 365
RoonBridge (64 bit only)
Last Post: scrarfussi
15-Feb-2024 08:26 PM
» Replies: 3
» Views: 4125

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.