[mythtv-commits] mythtv commit: r27283 - in trunk/mythtv by danielk
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Thu Nov 18 20:06:37 UTC 2010
Author: danielk
Date: 2010-11-18 20:06:36 +0000 (Thu, 18 Nov 2010)
New Revision: 27283
Changeset: http://svn.mythtv.org/trac/changeset/27283
Log:
Fixes #5190. This tweaks file writing and reading a bit to better interact with modern VM and disk i/o schedulers.
To explain... First, we were sometimes using the wrong syscall to sync data to disk in the TFW. The sync_file_range call only syncs allocated blocks, which is often a no-op when appending to a file. It is useful for database type workloads, but what we really want is fdatasync(). Second, we were only using posix_fadvise to tell the OS what we wanted it to cache (some of the time), but we were not using it to hint to the OS what data we won't need in the near future. I've added the hinting for the seek to end optimization and I've added the calls to tell the OS what data we don't need it to cache. The later is important for Linux in particular as it will penalize the next application that requests memory for our sins in keeping unneeded disk buffers in memory after we're done with them.
This is based on Ingo Molnar's comments in the "The State of Linux IO Scheduling For the Desktop" story on slashdot.org 2010-10-24, I've run it for several weeks without any problems. It does not have as great a positive effect as I had hoped, but it does provide some benefit. This may provide more benefit on machines with less RAM.
Modified:
trunk/mythtv/bindings/python/MythTV/static.py
trunk/mythtv/bindings/python/MythTV/tmdb/tmdb_api.py
trunk/mythtv/bindings/python/MythTV/ttvdb/tvdbXslt.py
trunk/mythtv/bindings/python/MythTV/ttvdb/tvdb_api.py
trunk/mythtv/libs/libmythtv/RingBuffer.cpp
trunk/mythtv/libs/libmythtv/ThreadedFileWriter.cpp
trunk/mythtv/libs/libmythtv/dbcheck.cpp
More information about the mythtv-commits
mailing list