Apache a sendfile

Martin `MJ' Mares mj na ucw.cz
Středa Květen 30 18:24:04 CEST 2007


Ahoj!

> 18:05:02.388711 sendfile(11, 12, [425122920], 3100072856) = 195480
> 18:05:02.388951 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 18:05:02.391883 sendfile(11, 12, [425318400], 3099877376) = 195480
> 18:05:02.392159 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 18:05:02.395060 sendfile(11, 12, [425513880], 3099681896) = 195480
> 18:05:02.395279 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 18:05:02.398020 sendfile(11, 12, [425709360], 3099486416) = 195480
> 18:05:02.398253 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 18:05:02.401230 sendfile(11, 12, [425904840], 3099290936) = 195480
> 18:05:02.401456 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 18:05:02.404867 sendfile(11, 12, [426100320], 3099095456) = 195480
> 18:05:02.405033 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 120000) = 1
> 
> Pritom kdyz podobne strace pustim na proftpd, tak tam je videt,
> ze proftpd par minut visi v tom sendfile() a za tu dobu odvysila treba
> cely ISO image CDcka. Funguje vam nekomu sendfile() v Apache lepe nez
> u me?

Apache2 jsem nikdy poradne nezkoumal, ale jen tak od pohledu na ten
strace soudim, ze Apache ten socket ma v non-blocking modu, takze se
sendfile vrati vzdy po naplneni odchoziho bufferu. Vzhledem k tomu,
ze to jsou 190K kusy, nemelo by to byt na zatizeni serveru nijak vyrazne
poznat.

				Mej se skvele
-- 
Martin `MJ' Mares                          <mj na ucw.cz>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.



Další informace o konferenci Linux