Re: [squid-users] A very low level question regarding performance of helpers.

From: Alan <lameventanas_at_gmail.com>
Date: Thu, 13 Feb 2014 10:02:19 +0900

On Thu, Feb 13, 2014 at 7:40 AM, Alex Rousskov
<rousskov_at_measurement-factory.com> 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);
}
}
Received on Thu Feb 13 2014 - 01:02:27 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 13 2014 - 12:00:05 MST