![]() |
downloads | documentation | HowTo | reporting bugs | links | Recent Changes |
What is a Wiki?See WikiWikiWeb If you don't know how to use a wiki see the WikiHowto ErfurtWiki is maintained by a loosely knit group of developers. Quick LinksRelated sitesContactPlease submit website bugs in the BugReports Contribute!Please file any wishes on UserSuggestions. Hosted By |
Edit history
Fixing IOBOUND & similiar problemsThis page describes how to resolve a series of problems whose symptoms includes:
I used to see the "IOBOUND" and "**application not reading fast enough**" errors multiple times/day. I made the changes outlined below in phases. Each change reduced the frequency of problems, but it required all of them to fully solve the problem. With all of these changes in place I have not had any of these problems in several months. CreditsThanks and credit go to Cecil, TJC, rando, sgunther, Brendan & bruce_s01 whose threads provided significant input into what you see here. You can see their original posts at
Optimize database to improve performanceOver time database performance will degrade and contribute to "IOBOUND" problems and sluggish responses to various requests. To restore full performance & minimize the database's physical size, do the following periodically:
You can also download and use the following script: optimize_db.sh which automates the process. Reduce the volume of program guide dataReducing the number of days of program guide data that I kept in my database from the default of 14 to 9 also reduced the incidence of "IOBOUND" errors for me. One way to determine if this change will benefit you is to look in the file /var/log/mythtv/mythbackend.log for a message that contains the following text "Scheduled nnn items in", where "nnn" is in integer value. The higher the value of "nnn", the higher the probability that your system will become IOBOUND when the scheduler runs. Before I made this change "nnn" was typically in the range of 680 - 750 for me; after making this change "nnn" is is in the range of 430 - 485. Since you already have 14 days of program guide data in your database, it will take 5 days before you see the full benefit of this change:
If you have any unused video sources hanging around, delete them using the myth-setup utility. This reduces the volume of data downloaded from zap2it into the database. Only do this if the video source is not needed and is not connected to any tuner cards:
Increase buffer size for IVTVThe following steps eliminated the "application not reading fast enough" errors for me. This procedure increases IVTV's buffer sizes from the default of 4/8/4/4 to 8/32/8/8. Some have reported that the problem goes away with a smaller increase to 4/16/4/4 - you can experiment to see what works best for you. You need enough RAM for this to be OK - I have 1 GB Note from joelsplace: I used options ivtv enc_yuv_buffers=8 enc_mpg_buffers=32 enc_vbi_buffers=8 enc_pcm_buffers=320 (pcm default R5F27) because pcm is in KB so the below line #4 changed mine to 8KB not 8MB.
Delete files slowlyYour system can delete old recordings at any time, depending on how your auto-expiration and other settings are configured. The deletion of recordings, especially hi-def recordings, can cause a lot of I/O and contribute to the problems outlined at the start of this article. To reduce the odds of these deletions causing problems, turn on the "Delete files slowly" option that is available in R5F27:
I found this helped my system even though I already use XFS, which is already very efficient at large file deletes. Fixing problematic watchdog scriptsThere are a lot of "watchdog" scripts scattered around various sites that are designed to detect backend failures and execute an automatic restart. Some of these scripts include a call to the status port (6544) to see if the backend is still running. This can be a problem as a call to the status port will issue ~500 database queries. A better approach that works under R5D1 & R5F27 is to invoke the "settings" screen, which only issues ~10 database queries:
Switch your /myth partition to XFSThe default file system format for the /myth partition is "ext3". While this file system is very stable, deleting large file requires significant disk I/O activity and will increase the odds of experiencing IOBOUND problems. Instructions for switching to XFS can be found here: Filesystem switch Do not switch your root partition ("/") to XFS, as your mysql database is located on the root partition. I have read articles indicating that database corruption can occur if a mysql database is placed on an XFS partition. More recent releases of mythtv provide an option to "delete files slowly". I have not tried this option, but it may be the case that turning this option on will help if you would rather not convert to XFS. This option is found in the mythtv-setup program (hit ALT-S to bring this up) in the general section. On the second tab, there is a check box you can select labeled "delete files slowly". Check out the mythtv wikiAdditional performance enhancements are documented in the mythtv wiki here. After upgrading from R5D1 to R5F27 I started getting IOBOUND errors twice/week. Applying the following tweaks documented in that article has helped significantly:
I/O intensive background jobsIf you have scripts that run periodically in the background, check carefully to see how much I/O they do. A process that is I/O intensive but not CPU intensive will cause IOBOUND problems even if you "nice" it. As an example, I had a script that ran every 20 minutes in "nice" mode. Upon close examination I found that this script was triggering copies of ~100MB of data on each run, most of which was unnecessary. I re-wrote it and it now drives under 100KB of I/O on each call. Increase vmalloc spaceThere are releases where there is not enough memory reserved for vmalloc. If you see messages in kern.log that contain the words "**out of vmalloc space**" or messages in mythbackend.log that contain the words "Cannot allocate memory", then you have this problem. If you are not seeing either of those specific error messages, then I would not make this change unless you have tried everything else in this article and are still having the other problems identified in this article. These instructions will work for R5D1 & R5F27:
EditThisPage BackLinks PageInfo Pages like this Attachments RSS/Atom last changed on Thu Jul 31 14:52:26 2008 |
UpdatedPages· WhatRemoteYouUse last changed on Sat Jul 31 10:46:47 2010· WhatCardYouUse last changed on Sat Jul 31 10:45:00 2010 · TinnyAudioPVR150 last changed on Fri Jul 30 03:20:30 2010 · KnoppMythWiki last changed on Thu Jul 29 04:35:17 2010 · HowTo last changed on Wed Jul 28 09:27:02 2010 · HardwareAcceleratedVideo last changed on Tue Jul 27 09:15:10 2010 · MythVodkaHowTo last changed on Tue Jul 27 09:14:04 2010 · DisklessFrontend last changed on Tue Jul 27 09:13:29 2010 · CompileMythTVFromSVN last changed on Tue Jul 27 07:39:28 2010 · MythMusic last changed on Tue Jul 27 07:38:00 2010 · RRD Disk Partition Usage last changed on Sun Jul 25 21:34:12 2010 · UserSuggestions last changed on Sun Jul 25 16:25:51 2010 · Links last changed on Sun Jul 25 16:21:33 2010 · KnoppmythDownloads last changed on Sun Jul 25 14:02:11 2010 · KnoppMythInstall last changed on Sun Jul 25 14:00:46 2010 · TroubleShooting last changed on Wed Jul 21 07:03:13 2010 · webminhowto last changed on Mon Jul 19 07:34:28 2010 · PickingComponents last changed on Wed Jul 14 17:27:40 2010 · mplayerResume last changed on Mon Jul 12 22:54:24 2010 · R5A12DvdRipping last changed on Mon Jul 12 14:44:04 2010 · Additional Software last changed on Mon Jul 12 14:42:31 2010 · HowToUseMyth last changed on Mon Jul 12 14:41:09 2010 · x11vncHowTo last changed on Sun Jul 11 00:06:20 2010 · CountrySpecific last changed on Thu Jul 1 14:48:40 2010 · RepairingMythConvergDB last changed on Thu Jul 1 14:42:58 2010 · tv_grab_au last changed on Tue Jun 29 15:44:05 2010 |
| sitemap | | |