The storage requirements of an AdSense system are stunningly modest. If each URL has just 8 “high-value” keywords, each represented by a single 32-bit number, then the keywords for each URL could be represented with just 32 bytes. The high value keywords of 4 billion URLs could be stored in 128GB, which would cost only $100 (circa 2006). 400 billion URLs or 100 drives (for a redundancy of 100) would require only $10,000 in storage costs.
AdSense serves a very large number of pages each day. If each day around 1B people saw 10 AdSense impressions (or 100M people saw 100 AdSense impressions), then AdSense would serve around 10B requests/day, or 115,741 requests/sec. If one machine can serve 20 reqs/second (seek times to read a random 4096-byte location on a drive allow for bursts of well over 100 reqs/second), then Google would require 5,787 servers to serve these 10B reqs/day. If each of these servers were hosted at a cost of $100/month, then it would cost $579K/month to run the adservers needed.
Suppose these 10B impressions/day generated clicks at a clickthrough rate of .3% and an average CPC of $.10. Then each day Google would receive 30M clicks/day (347 clicks/sec), generating $3M/day ($34.77/sec), or 900M clicks/month, generating $90M/month.