Detailed Analysis of a Trace
Here is a system call trace of Apache 1.3 running on Linux. The runtime configuration file is essentially the default plus:
<Directory /> AllowOverride none Options FollowSymLinks </Directory>
The file being requested is a static 6K file of no particular
content. Traces of non-static requests or requests with content
negotiation look wildly different (and quite ugly in some cases).
First we’ll look at the entire trace, then we’ll examine
details. (This was generated by the strace
program, other similar programs include truss
,
ktrace
, and par
):
accept(15, {sin_family=AF_INET, sin_port=htons(22283), sin_addr=inet_addr("127.0.0.1")}, [16]) = 3 flock(18, LOCK_UN) = 0 sigaction(SIGUSR1, {SIG_IGN}, {0x8059954, [], SA_INTERRUPT}) = 0 getsockname(3, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 setsockopt(3, IPPROTO_TCP1, [1], 4) = 0 read(3, "GET /6k HTTP/1.0\r\nUser-Agent: "..., 4096) = 60 sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}) = 0 time(NULL) = 873959960 gettimeofday({873959960, 404935}, NULL) = 0 stat("/home/dgaudet/ap/apachen/htdocs/6k", {st_mode=S_IFREG|0644, st_size=6144, ...}) = 0 open("/home/dgaudet/ap/apachen/htdocs/6k", O_RDONLY) = 4 mmap(0, 6144, PROT_READ, MAP_PRIVATE, 4, 0) = 0x400ee000 writev(3, [{"HTTP/1.1 200 OK\r\nDate: Thu, 11"..., 245}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 6144}], 2) = 6389 close(4) = 0 time(NULL) = 873959960 write(17, "127.0.0.1 - - [10/Sep/1997:23:39"..., 71) = 71 gettimeofday({873959960, ...
Get Web Performance Tuning now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.