Search squid archive

Re: A very low level question regarding performance of helpers.

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

 



On Thu, Feb 13, 2014 at 7:40 AM, Alex Rousskov
<rousskov@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 02/09/2014 06:48 AM, Eliezer Croitoru wrote:
>> I have helpers in all sort of languages and it seems to me that there is
>> a limit that do exist on the interface between squid and the helpers by
>> the nature of the code as code.
>
> For sequential helpers, the throughput is a function of response time:
>
>   requests per second = number of helpers / mean response time
>
> where the response time is the time from the creation of the helper
> request (by Squid) to the end of processing of the helper response (by
> Squid). Thus, it includes overheads of all components participating in
> helper transaction (Squid, helper, OS, etc).

It would be interesting to compare the time it takes for Squid to
process the helper transaction vs the time it takes to the helper to
give back a result.  Some helpers can be complicated, so this can also
help us decide good values for the helper's ttl and cache limit.

And Amos is right about the code, it doesn't exit on eof (I thought
Squid sent it a signal to end it).  But feof only works on streams, so
here is another version in case anybody (Eliezer?) is interested in
measuring this:

#include <unistd.h>
int main(int argc, char *argv[]) {
char in[32768];
char out[3] = "OK\n";
while (0 < read(0, in, 256)) {
write(1, out, 3);
fsync(1);
}
}




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux