parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What to do if $TMPDIR runs full?


From: Ole Tange
Subject: Re: What to do if $TMPDIR runs full?
Date: Sun, 1 Dec 2013 14:10:07 +0100

On Sun, Dec 1, 2013 at 12:56 AM, Ole Tange <tange@gnu.org> wrote:

> Maybe it would be possible to append a byte to the tmp files before
> printing them. If ftell stays the same then the append did not work
> and a warning should be written. If it worked, seek back 1 byte and
> truncate. This, however, might slow down printing of a job, and seems
> like a lot of checking to do for each and every job for the off chance
> that $TMPDIR is full.

I have now implemented this idea. A single byte was not enough. In my
tests I had to use 8kbytes - maybe it has to be more than a file
system block or a page frame?

It costs 0.07 ms per job on my system: 1.97 ms -> 2.04 ms. So it
clearly slows down printing, but I consider a 3% runtime increase of
the smallest jobs acceptable. On big jobs the increase will still be
0.07 ms and thus less than a 3% increase.

It will not catch every situation of disk full, but it will probably
catch most real life situations.


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]