[vdr] [ANNOUNCE] VDR developer version 1.7.31

Klaus Schmidinger Klaus.Schmidinger at tvdr.de
Wed Oct 3 14:55:16 CEST 2012


On 03.10.2012 13:03, Udo Richter wrote:
> Am 30.09.2012 15:41, schrieb Klaus Schmidinger:
>> - The new class cIoThrottle is used to allow I/O intense threads to temporarily
>>    suspend their activities in case buffers run full (suggested by Torsten Lang).
>>    Currently the cutter thread is suspended if the TS or Recorder buffer use more
>>    than 50% of their capacity. Plugin authors may want to participate in this
>>    mechanism if they use intense background I/O.
>
> I'd suggest to use this for the low disk space deleted recording cleanup too. Recently, I've seen an issue like this happen, using VDR-1.7.30, where my disk was nearly full, and some deleted recordings didn't get wiped before a new recording.

I guess this should do the trick:

--- recording.c 2012/09/30 13:05:14     2.64
+++ recording.c 2012/10/03 12:52:13
@@ -97,6 +97,8 @@
       bool deleted = false;
       cThreadLock DeletedRecordingsLock(&DeletedRecordings);
       for (cRecording *r = DeletedRecordings.First(); r; ) {
+         if (cIoThrottle::Engaged())
+            return;
           if (r->Deleted() && time(NULL) - r->Deleted() > DELETEDLIFETIME) {
              cRecording *next = DeletedRecordings.Next(r);
              r->Remove();

> The deleting was surprisingly slow, probably because of the high disk fill and fragmentation. And for some reason, the overflow happened after the deleting. Not sure what caused the delay.

Which file system are you using for your video directory?
I recently switched from ext3 to ext4 and it does feel a little "snappier".

Klaus



More information about the vdr mailing list