Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Web

Adding DTrace probes to Apache

webdtraceNov 20, 2005 4 min read

In an attempt to learn how DTrace probes and Apache work, I called up my friend Clay last week, and we sat down to integrate some probes into Apache. After looking through the Apache source code and analyzing the available documentation on statically defined probes, we determined that adding probes would be simple, but getting apache to build would be a bit tedious (luckily Clay is an autoconf/libtool expert!!). After mucking with the build process for a few hours, Clay was able to tweak the APR (Apache Portable Runtime) Makefile.in, and we were able to integrate numerous DTrace probes into Apache. The first probe we added was in the apr_palloc() routine: This probe would be helpful for figuring out which pools were accessed, and for determing the number of bytes allocated to each pool: We can also use this probe to understand how frequently apr_palloc() gets called: After toying with the memory management layer (the really interesting stuff comes from the Apache allocator() routines -- but that is a BLOG entry in and of itself), we decided to add a probe to display incoming connections: Result: %d IP Address: %x SRC Port %d ",pid, (int)copyin(arg0,4), (int)copyin(arg1,4), (short int)copyin(arg2,4)); }'` This probe will display the httpd process id that accept()'ed the connection along with the SRC port ad IP address of the client…

$ read more →

Debugging libtool

webNov 20, 2005 1 min

While debugging Apache this week, I wanted to get verbose output from libtool. After digging around on the web, I found that setting LTFLAGS to "--debug" will cause libtool to display numerous useful pieces of information: If you are trying to figure out how things are built with libtool, this will definitely helpful!

$ read more →

Firefox HTTP header plugin

webNov 5, 2005 1 min

If you are periodically tasked with debugging web applications, you may have heard of the Firefox HTTP Live Headers plug-in. This plug-in is useful for displaying HTTP request and response headers, and allows regular expressions to be used to control which pages and content are retrieved. I can't figure out if I like this plug-in or the greasemonkey plug-in better. Choices Choices!

$ read more →

mod_deflate benchmarks

webOct 29, 2005 1 min

I came across a cool article that shows the bandwidth savings that can be achieved by using Apache's mod_deflate module. Since people are still using 56k modems to connect to the Internet, compressing content can decrease the time it takes to render pages on dial-up connections.

$ read more →

Printing HTTP headers with curl

webOct 18, 2005 1 min

When debugging web applications, most adminstrators will review the HTTP request and response headers for errors. This information can be retrieved with Firefox's HTTP Live headers plugin, ethereal, or with curl's "-v" (make the operation more talkative) option: The ">" and "<" characters are used to indicate the direction the requests are sent and received. The curl(1) manual page indicates that the "-i" (Include protocol headers in the output) option should print protocol headers, but for some reason it only prints the HTTP response headers: When I get more time, I will have to go wandering through the curl source code to see why.

$ read more →