Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Swappiness needs to be reduced and zram swap added
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Swappiness needs to be reduced and zram swap added
23rd Mar, 2015, 10:03 PM
Post: #1
jbruchon Offline
Registered
Posts: 1
Joined: Mar 2015
Reputation: 0
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.
Find all posts by this user
Quote this message in a reply
26th Mar, 2015, 09:39 AM
Post: #2
f1vefour Offline
Administrator
******
Posts: 1,342
Joined: Mar 2013
Reputation: 58
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
26th Mar, 2015, 07:20 PM
Post: #3
Fabio72 Offline
Registered
Posts: 96
Joined: Feb 2014
Reputation: 5
RE: Swappiness needs to be reduced and zram swap added
Zswap is enabled, zram is no more supported on raspi kernel
Find all posts by this user
Quote this message in a reply
10th Apr, 2015, 08:45 AM
Post: #4
narotic Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 1
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.
Find all posts by this user
Quote this message in a reply
10th Apr, 2015, 08:47 AM
Post: #5
narotic Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 1
RE: Swappiness needs to be reduced and zram swap added
* double post *
Find all posts by this user
Quote this message in a reply
11th Apr, 2015, 05:39 AM
Post: #6
Fabio72 Offline
Registered
Posts: 96
Joined: Feb 2014
Reputation: 5
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
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 11th May, 2025, 06:25 AM Powered By MyBB, © 2002-2025 MyBB Group.