You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by dean gaudet <dg...@arctic.org> on 2000/06/10 04:17:00 UTC

cool

2.0's syscall pattern for a simple request is pretty clean:

accept(6, {sin_family=AF_INET, sin_port=htons(53444), sin_addr=inet_addr("209.228.8.154")}, [16]) = 9
getsockname(9, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("204.107.140.52")}, [16]) = 0
fcntl(7, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x805f24c, [], SA_INTERRUPT|0x4000000}, 8) = 0
fcntl(9, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(9, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
read(9, 0x80c28dc, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
select(10, [9], NULL, NULL, {300, 0})   = 1 (in [9], left {300, 0})
read(9, "GET /index.html HTTP/1.0\r\nIf-Mod"..., 4096) = 379
gettimeofday({960603170, 913828}, NULL) = 0
stat("/home/dgaudet/ap2/htdocs/index.html", {st_mode=S_IFREG|0664, st_size=255, ...}) = 0
open("/home/dgaudet/ap2/htdocs/index.html", O_RDONLY) = 10
mmap(0, 255, PROT_READ, MAP_SHARED, 10, 0) = 0x123000
close(10)                               = 0
read(9, 0x80c28dc, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
write(9, "HTTP/1.1 200 OK\r\nDate: Sat, 10 J"..., 543) = 543
write(5, "209.228.8.154 - - [09/Jun/2000:1"..., 82) = 82
munmap(0x123000, 255)                   = 0
read(9, 0x80c28dc, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
select(10, [9], NULL, NULL, {15, 0})    = ? ERESTARTNOHAND (To be restarted)
--- SIGINT (Interrupt) ---
close(9)                                = 0

21 syscalls.

that's for the prefork mpm.

oh, looks like TCP_NODELAY is missing.  so make it 22 after that bug is
fixed.

about the same as 1.3 (fewer signal manipulations :)

-dean


Re: cool

Posted by rb...@covalent.net.
> 21 syscalls.
> 
> that's for the prefork mpm.

That's also without trying to minimize it.  :-)  I think we are doing an
extra DNS lookup BTW in the network stuff, but I haven't really looked
into it yet.

> 
> oh, looks like TCP_NODELAY is missing.  so make it 22 after that bug is
> fixed.
> 
> about the same as 1.3 (fewer signal manipulations :)

I think we can lower that number with a bit more work, but I need to
really study this before I commit to that.  :-)

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------