For quite a while I was not satisfied with the performance of one of my Windows 2008 servers. While the machine had reasonable processing power, a fair amount of RAM and almost no disk IO the rendering performance of PHP pages on IIS 7 was simply atrocious.
Different PHP versions, lots of TCP and Wincache tweaking – no cigar. What could possibly cause the server to wait for about 8 seconds to render a simple WordPress front page?
The answer puzzled me: localhost.
Due to the IPv6 address of the machine, some kinky routine preffered the IPv6 address over the IPv4 one, causing significant slowdowns on each and every request to MySQL.
After simply replacing “localhost” with “127.0.0.1” in all configuration parameters I got the kind of snappy performance I expected. Crazy stuff.