View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Dec 12, 2009 3:14 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1995
Location: /dev/null
Add this to your /etc/sysctl.conf then reboot

Code:
vm.swappiness=20
vm.vfs_cache_pressure=50


These settings will make the kernel less apt to use your swap space. My R6 box has 2 gigs on memory on it and when I inspected the RAM/swap usage with htop, I was amazed to see that 300 meg of RAM was in use and 200 meg of swap was also in use. After appending the two lines above, and rebooting, I haven't seen swap get used at all (as it should be w/ 2 gigs of physical memory).

Note that the default value for vm.swappiness is 60. I've read guides that suggest you can lower it to 1 but I've been using 20 just fine in R6. My old R6 box only had 1 gig of memory and I also used these settings just fine. If you have less than 1 gig I can't comment on performance (good or bad). On my workstation, I used a value of 1.

Want to read more about these settings?

http://www.linode.com/wiki/index.php/Swappiness
http://forums.debian.net/viewtopic.php?f=16&t=31275
http://rudd-o.com/en/linux-and-free-sof ... o-fix-that

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 12, 2009 4:47 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
That looks like a cool tip graysky. I'll definately be making this tweak (when I've a few minutes.)

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 28, 2010 2:06 pm 
Offline
Joined: Wed Feb 08, 2006 6:13 pm
Posts: 480
Location: IN
Just saw this thread. Never knew about htop before, pretty slick little program. My findings on my box (combined FE/BE with 2 gig RAM) were almost identical to Graysky's.

I've been having what seems to be random lag navigating the program guide from time to time and hope perhaps this fixes it.

Martian

_________________
ABIT NF-M2 nView | Athlon 64 X2 3800+ | 2GB DDR2 800 | HDHomerun | GeForce 6150 (onboard) | WD 640 GB SATA HD | DVD-RW (sata) | StreamZap IR receiver with Logitech Harmony remote

Vizio 37" LCD HDTV (1080p)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2010 5:15 am 
Offline
Joined: Tue May 11, 2010 2:51 am
Posts: 31
Location: Turin - Italy
To easily setup exec:
sudo sysctl -w vm.swappiness=20
sudo sysctl -w vm.vfs_cache_pressure=50

_________________
MBE - ASUS M2NPLUS PRO | RAM 4GB | HD 1TB | 4xHVR-1300 | LinHES 6.03
FE -D945GLF2 | RAM 2GB | HD 250GB | LinHES 6.03


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2010 6:49 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
There is a chance these settings will revert back to default after doing an upgrade, such as from R6.02 to R6.03, so be sure to check them afterwords.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 22, 2010 8:57 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 336
I had my swappiness set to 20 with 6.01, but now with 6.03 I am getting some odd behavior. I have tried both the setting of 20 and the default setting of 60 now.

On Mondays, I will have 3 things which begin recording at 7:00 pm. One is SD (30 mins), the other 2 are HD (60 mins each). I will typically watch the SD recording first so that I can skip ahead during the commercials on the longer recordings. But when the 2 HD recordings finish recording, the playback will hesitate or get jerky for less than 30 seconds.

In my mythfrontend.log I will get
Code:
2010-11-22 20:01:33.473 TV: Attempting to change from WatchingRecording to WatchingPreRecorded
2010-11-22 20:01:33.778 TV: Changing from WatchingRecording to WatchingPreRecorded
2010-11-22 20:01:36.747 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:01:36.748 Using runtime prefix = /usr
2010-11-22 20:01:36.748 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:01:36.749 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:01:36.749 Using runtime prefix = /usr
2010-11-22 20:01:36.749 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:01:36.749 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:01:36.750 Using runtime prefix = /usr
2010-11-22 20:01:36.750 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:01:36.750 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:01:36.751 Using runtime prefix = /usr
2010-11-22 20:01:36.751 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:01:36.815 Empty LocalHostName.
2010-11-22 20:01:36.815 Using localhost value of mythtv
2010-11-22 20:01:36.816 Empty LocalHostName.
2010-11-22 20:01:36.816 Using localhost value of mythtv
2010-11-22 20:01:36.816 Empty LocalHostName.
2010-11-22 20:01:36.816 Using localhost value of mythtv
2010-11-22 20:01:36.816 Empty LocalHostName.
2010-11-22 20:01:36.817 Using localhost value of mythtv
2010-11-22 20:01:37.047 New DB connection, total: 1
2010-11-22 20:01:37.048 New DB connection, total: 1
2010-11-22 20:01:37.050 New DB connection, total: 1
2010-11-22 20:01:37.053 New DB connection, total: 1
2010-11-22 20:01:37.091 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.091 Closing DB connection named 'DBManager0'
2010-11-22 20:01:37.092 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.092 Closing DB connection named 'DBManager0'
2010-11-22 20:01:37.092 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.093 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.101 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.101 Closing DB connection named 'DBManager0'
2010-11-22 20:01:37.103 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.115 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:01:37.115 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:01:37.117 ProgramInfo(): Updated pathname '':'' -> '20251_20101122190000.mpg'
2010-11-22 20:01:37.118 ProgramInfo(): Updated pathname '':'' -> '20251_20101122190000.mpg'
2010-11-22 20:01:37.121 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.132 Closing DB connection named 'DBManager0'
2010-11-22 20:01:37.134 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:01:37.123 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:01:37.140 ProgramInfo(): Updated pathname '':'' -> '20251_20101122190000.mpg'
2010-11-22 20:01:37.147 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:01:37.149 ProgramInfo(): Updated pathname '':'' -> '20251_20101122190000.mpg'
2010-11-22 20:01:40.129 AFD: Opened codec 0x98dc640, id(MPEG2VIDEO) type(Video)
2010-11-22 20:01:40.129 AFD: codec AC3 has 2 channels
2010-11-22 20:01:40.129 AFD: Opened codec 0x98ef3b0, id(AC3) type(Audio)
2010-11-22 20:01:40.134 AFD: Opened codec 0x8348540, id(MPEG2VIDEO) type(Video)
2010-11-22 20:01:40.134 AFD: codec AC3 has 2 channels
2010-11-22 20:01:40.135 AFD: Opened codec 0x835b260, id(AC3) type(Audio)
2010-11-22 20:01:40.156 AFD: Opened codec 0x8c91540, id(MPEG2VIDEO) type(Video)
2010-11-22 20:01:40.157 AFD: codec AC3 has 2 channels
2010-11-22 20:01:40.157 AFD: Opened codec 0x8c92eb0, id(AC3) type(Audio)
2010-11-22 20:01:40.161 AFD: Opened codec 0x9d9d540, id(MPEG2VIDEO) type(Video)
2010-11-22 20:01:40.161 AFD: codec AC3 has 2 channels
2010-11-22 20:01:40.162 AFD: Opened codec 0x9d9eeb0, id(AC3) type(Audio)
2010-11-22 20:01:42.390 NVP(4): prebuffering pause
2010-11-22 20:01:44.833 WriteAudio: buffer underrun
2010-11-22 20:01:45.660 NVP(4): Timed out waiting for free video buffers.
2010-11-22 20:01:46.803 NVP(4): prebuffering pause
2010-11-22 20:01:46.804 WriteAudio: buffer underrun
2010-11-22 20:01:48.522 NVP(4): prebuffering pause
2010-11-22 20:01:49.375 NVP(4): prebuffering pause
2010-11-22 20:01:51.965 Preview: Grabbed preview '/myth/tv/20251_20101122190000.mpg' 1920x1088@94s
2010-11-22 20:01:51.965 Preview: Grabbed preview '/myth/tv/20251_20101122190000.mpg' 1920x1088@94s
2010-11-22 20:01:51.986 Preview: Grabbed preview '/myth/tv/20251_20101122190000.mpg' 1920x1088@94s
2010-11-22 20:01:51.994 Preview: Grabbed preview '/myth/tv/20251_20101122190000.mpg' 1920x1088@94s
2010-11-22 20:01:54.026 ~MythContext waiting for threads to exit.
2010-11-22 20:01:54.027 ~MythContext waiting for threads to exit.
2010-11-22 20:01:54.027 ~MythContext waiting for threads to exit.
2010-11-22 20:01:54.035 ~MythContext waiting for threads to exit.
2010-11-22 20:02:34.268 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:02:34.269 Using runtime prefix = /usr
2010-11-22 20:02:34.269 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:02:34.269 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:02:34.270 Using runtime prefix = /usr
2010-11-22 20:02:34.270 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:02:34.270 mythbackend version: branches/release-0-23-fixes [25661M] www.mythtv.org
2010-11-22 20:02:34.271 Using runtime prefix = /usr
2010-11-22 20:02:34.271 Using configuration directory = /home/mythtv/.mythtv
2010-11-22 20:02:34.306 Empty LocalHostName.
2010-11-22 20:02:34.306 Using localhost value of mythtv
2010-11-22 20:02:34.306 Empty LocalHostName.
2010-11-22 20:02:34.306 Using localhost value of mythtv
2010-11-22 20:02:34.307 Empty LocalHostName.
2010-11-22 20:02:34.307 Using localhost value of mythtv
2010-11-22 20:02:34.496 New DB connection, total: 1
2010-11-22 20:02:34.497 New DB connection, total: 1
2010-11-22 20:02:34.498 New DB connection, total: 1
2010-11-22 20:02:34.561 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.561 Closing DB connection named 'DBManager0'
2010-11-22 20:02:34.562 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.563 Closing DB connection named 'DBManager0'
2010-11-22 20:02:34.563 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.565 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.565 Closing DB connection named 'DBManager0'
2010-11-22 20:02:34.585 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.586 Connected to database 'mythconverg' at host: 192.168.1.210
2010-11-22 20:02:34.602 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:02:34.605 ProgramInfo(): Updated pathname '':'' -> '20431_20101122190000.mpg'
2010-11-22 20:02:34.607 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:02:34.609 ProgramInfo(): Updated pathname '':'' -> '20431_20101122190000.mpg'
2010-11-22 20:02:34.615 Current MythTV Schema Version (DBSchemaVer): 1254
2010-11-22 20:02:34.617 ProgramInfo(): Updated pathname '':'' -> '20431_20101122190000.mpg'
2010-11-22 20:02:37.430 AFD: Opened codec 0x97af5b0, id(MPEG2VIDEO) type(Video)
2010-11-22 20:02:37.430 AFD: codec AC3 has 2 channels
2010-11-22 20:02:37.432 AFD: Opened codec 0x97c2220, id(AC3) type(Audio)
2010-11-22 20:02:37.432 AFD: Opened codec 0xa15e500, id(MPEG2VIDEO) type(Video)
2010-11-22 20:02:37.432 AFD: codec AC3 has 2 channels
2010-11-22 20:02:37.433 AFD: Opened codec 0xa171220, id(AC3) type(Audio)
2010-11-22 20:02:37.435 AFD: Opened codec 0xa060270, id(MPEG2VIDEO) type(Video)
2010-11-22 20:02:37.436 AFD: codec AC3 has 2 channels
2010-11-22 20:02:37.437 AFD: Opened codec 0xa072f90, id(AC3) type(Audio)
2010-11-22 20:02:39.299 Preview: Grabbed preview '/myth/tv/20431_20101122190000.mpg' 1280x720@94s
2010-11-22 20:02:39.311 Preview: Grabbed preview '/myth/tv/20431_20101122190000.mpg' 1280x720@94s
2010-11-22 20:02:39.405 Preview: Grabbed preview '/myth/tv/20431_20101122190000.mpg' 1280x720@94s
2010-11-22 20:02:39.561 ~MythContext waiting for threads to exit.
2010-11-22 20:02:39.566 ~MythContext waiting for threads to exit.
2010-11-22 20:02:39.628 ~MythContext waiting for threads to exit.


While some of this seems unusual, I am posting it in this thread, because if I look at the rrd chart, the swap seems to jump from about 8% to 35% at the same time (with swappiness @ 60). When swappiness was set to 20 it would usually begin at 0% and maybe jump to around 30%. My swap is set to 1GB, so that 27% jump is over 250MB swapping out immediately. When swappiness was set to 20, I thought maybe it was waiting too long to swap and then swapping a bunch all at once, so I switched to the default 60, but I just saw it happen again. If I drop swappiness even more, might that "fix" it, or is there some other underlying problem?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu