Mailing List Archive

sendfile() in varnish
Hello.

I using Varnish for Ajax based API server.
with
-T 127.0.0.1:10411 \
-f /var/home/yu/etc/000.vcl \
-s file,/home/cache,16g \
-p thread_pool_min=512 \
-p thread_pool_max=3096 \
-p thread_pools=16 \
-p listen_depth=3096 \
-p client_http11=on \
-p backend_http11=on \
-p cc_command="cc -fpic -shared -O3 -Wl,-x -o %o %s" \
-p lru_interval=21600 \
-P /var/run/varnishd.pid \
-u www \
-a 0.0.0.0:80

value of varnishstat "Objects sent with sendfile" is almost 0.
0 0.00 0.00 Objects sent with sendfile

so, write() called.
37327571 335.20 157.86 Objects sent with write

when do you use sendfile()?

regards,

-------
Yutaro Shimamura
yu at irx.jp
sendfile() in varnish [ In reply to ]
Hello.

I using Varnish for Ajax based API server.
with
-T 127.0.0.1:10411 \
-f /var/home/yu/etc/000.vcl \
-s file,/home/cache,16g \
-p thread_pool_min=512 \
-p thread_pool_max=3096 \
-p thread_pools=16 \
-p listen_depth=3096 \
-p client_http11=on \
-p backend_http11=on \
-p cc_command="cc -fpic -shared -O3 -Wl,-x -o %o %s" \
-p lru_interval=21600 \
-P /var/run/varnishd.pid \
-u www \
-a 0.0.0.0:80

value of varnishstat "Objects sent with sendfile" is almost 0.
0 0.00 0.00 Objects sent with sendfile

so, write() called.
37327571 335.20 157.86 Objects sent with write

when do you use sendfile()?

regards,

-------
Yutaro Shimamura
yu at irx.jp
sendfile() in varnish [ In reply to ]
Yutaro Shimamura skrev:

> when do you use sendfile()?

Sendfile is not used on Linux or FreeBSD. If I recall correctly it's
because there is no sure way of knowing when the sendfile call is done
with the data.


Per.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://projects.linpro.no/pipermail/varnish-dev/attachments/20080522/a0b76e6b/attachment.pgp
sendfile() in varnish [ In reply to ]
Yutaro Shimamura skrev:

> when do you use sendfile()?

Sendfile is not used on Linux or FreeBSD. If I recall correctly it's
because there is no sure way of knowing when the sendfile call is done
with the data.


Per.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://projects.linpro.no/pipermail/varnish-dev/attachments/20080522/a0b76e6b/attachment-0001.pgp
sendfile() in varnish [ In reply to ]
In message <2BEFE70A-FCB1-4E37-96BC-B6D8E5252C0A at irx.jp>, Yutaro Shimamura writ
es:

>value of varnishstat "Objects sent with sendfile" is almost 0.
> 0 0.00 0.00 Objects sent with sendfile
>
>so, write() called.
> 37327571 335.20 157.86 Objects sent with write
>
>when do you use sendfile()?

By default: never, there are problems with all sendfile() implementations
that prevent them from being usable in Varnish. Only FreeBSD-Current
and later FreeBSD-8 will support sendfile().

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
sendfile() in varnish [ In reply to ]
In message <2BEFE70A-FCB1-4E37-96BC-B6D8E5252C0A at irx.jp>, Yutaro Shimamura writ
es:

>value of varnishstat "Objects sent with sendfile" is almost 0.
> 0 0.00 0.00 Objects sent with sendfile
>
>so, write() called.
> 37327571 335.20 157.86 Objects sent with write
>
>when do you use sendfile()?

By default: never, there are problems with all sendfile() implementations
that prevent them from being usable in Varnish. Only FreeBSD-Current
and later FreeBSD-8 will support sendfile().

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.