Swappiness needs to be reduced and zram swap added
|
23rd Mar, 2015, 10:03 PM
Post: #1
|
|||
|
|||
Swappiness needs to be reduced and zram swap added
I am using the RPi model B (512MB) for which 'free' reports 366012 KB of total available memory. I have experienced occasional problems with audio/video freezing and stuttering on Xbian (particularly on 1080p streams) and I have determined that this is due to aggressive swapping the SD card and the swap thrashing that results. I reduced swappiness in /etc/sysctl.d/00-xbian to 'vm.swappiness = 20' and most of the video problems went away. It also seems as if apt occasionally starts to check for updated software (because of cron?) and gets stuck, never terminating.
Also, to minimize swaps to the slow SD card, the zram module needs to be added to the system and a small zram-based swap should be set up with a higher priority than the SD card. Combining these two changes will eliminate most of the unnecessary swapping overhead and improve the system's overall responsiveness. Unfortunately, the kernel in Xbian doesn't have zram available, preventing me from easily adding it to my own installation. |
|||
26th Mar, 2015, 09:39 AM
Post: #2
|
|||
|
|||
RE: Swappiness needs to be reduced and zram swap added
Zram swap is enabled by default, or at least it was.
Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us. |
|||
26th Mar, 2015, 07:20 PM
Post: #3
|
|||
|
|||
RE: Swappiness needs to be reduced and zram swap added
Zswap is enabled, zram is no more supported on raspi kernel
|
|||
10th Apr, 2015, 08:45 AM
Post: #4
|
|||
|
|||
RE: Swappiness needs to be reduced and zram swap added
Are you completely sure that swapping is the culprit? I ask because there recently have been some problems with stuttering in some x264 files. This has already been fixed upstream in the latest raspberry pi firmware, but that hasn't found its way yet to xbian stable. More info: http://forum.kodi.tv/showthread.php?tid=215399
If it really is a lack of memory, then it might be easiest to just remove xbian-package-splash. That should free more than 25MB (RSS!) at the cost of some eyecandy: Code: 1697 root 20 0 38160 28m 596 S 0.0 7.6 0:00.81 splash-daemon Apt will complain that it's an essential package, so do it at your own risk. Personally I haven't noticed any side-effects yet other than that the Dim screensaver actually shows the terminal as background rather than a solid black. |
|||
10th Apr, 2015, 08:47 AM
Post: #5
|
|||
|
|||
RE: Swappiness needs to be reduced and zram swap added
* double post *
|
|||
11th Apr, 2015, 05:39 AM
Post: #6
|
|||
|
|||
RE: Swappiness needs to be reduced and zram swap added
I'd like to check zswap behaviour but debugfs seem not supported in kernel and, as I undestood, it's necessary to examine zswap
|
|||
« Next Oldest | Next Newest »
|