[mythtv] [mythtv-commits] mythtv commit: r23435 - in trunk/mythtv by mdean

Yeechang Lee ylee at pobox.com
Thu Feb 4 16:46:58 UTC 2010


Daniel Kristjansson <danielk at cuymedia.net> says:
> We want deletes to take less than 0.01 seconds but can tolerate 0.04
> to 0.21 seconds depending on other factors.

May I again suggest, then, considering adjusting upward the stock
ThreadedBufferWriter buffer sizes? Or (WARNING: Configuration setting
feature request incoming) permitting their adjustment outside
compilation?

While the 0.22 writer's performance is *greatly* improved, I still
find that something like

-const uint ThreadedFileWriter::TFW_DEF_BUF_SIZE   = 2*1024*1024;
-const uint ThreadedFileWriter::TFW_MAX_WRITE_SIZE = TFW_DEF_BUF_SIZE / 4;
-const uint ThreadedFileWriter::TFW_MIN_WRITE_SIZE = TFW_DEF_BUF_SIZE / 32;
+const uint ThreadedFileWriter::TFW_DEF_BUF_SIZE   = 64*1024*1024;
+const uint ThreadedFileWriter::TFW_MAX_WRITE_SIZE = TFW_DEF_BUF_SIZE / 32;
+const uint ThreadedFileWriter::TFW_MIN_WRITE_SIZE = TFW_DEF_BUF_SIZE / 256;

is required to ensure that FireWire (not ATSC) recordings' lengths are
consistently (recording time - 5 seconds  1 second) versus (recording
time - 30 seconds  15 seconds) without the patch.

(I have empirically tested 64 to see whether it is the optimal value
for my JFS-based RAID arrays, but a larger value than 2 definitely
is. From 0.18 to 0.21 I had to use something akin to

+const uint ThreadedFileWriter::TFW_DEF_BUF_SIZE   = 256*1024*1024;
+const uint ThreadedFileWriter::TFW_MAX_WRITE_SIZE = TFW_DEF_BUF_SIZE / 128;
+const uint ThreadedFileWriter::TFW_MIN_WRITE_SIZE = TFW_DEF_BUF_SIZE / 1024;

for the same results, and the writer was still not nearly as resilient
as it is now.)

-- 
Frontend/backend:	P4 3.0GHz, 1.5TB software RAID 5 array
Backend:		Quad-core Xeon 1.6GHz, 6.6TB sw RAID 6
Video inputs:		Four high-definition over FireWire/OTA
Accessories:		47" 1080p LCD, 5.1 digital, and MX-600


More information about the mythtv-dev mailing list