Mailing List Archive


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

Re: [tlug] Re: Apache: Logging: how-to pipe logs orlogtoanothermachine (was Disk



>>>>> "BR" == Bruno Raoult <br@example.com> writes:

    >> 
    >> Yes but you can also see several reads before the write. It means that
    >> gzip writes its output after certain number of reads (6 for the first
    >> output, 6*BUFSIZ = 49152 according to what I found out). But I think
    >> the internal buffering (a number of reads followed by a number of
    >> writes) depends on the compressing algorithm.
    >> 
    >> Viktor

    BR> I don't think so: As soon as 16K are ready for output, they
    BR> are written.  You could have 2, 4, 10, or 100 8K reads prior
    BR> to this, depending on your input file (see your file filled
    BR> with "1", where gzip will read all the data before the unique
    BR> output...).  I just checked gzip source files (gzip.h), and
    BR> they don't use stdio (this was obvious because of the
    BR> different output buffer size), but rather use they own
    BR> buffers. These buffers sizes are different on input and
    BR> output, and are decided at compilation time: 8K or 32K for
    BR> input, 8K or 16K for output.  *BUT* you could also force these
    BR> values at compilation time (they are not overwritten), meaning
    BR> that your OUTBUFSIZE could be different...

Okay, now we know. My experiment must have had a flaw. Thanks for
going into that trouble (looking at the source :) and explaining.

Viktor


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links