Split from #1064212-9: Page caching performance has regressed by 30-40%:
I do have date.timezone set - as such the call to drupal_get_user_timezone only takes about 100 µs.
For my system (Windows 7, IIS / PHP 5.3 (fastcgi autoscales) + wincache 2 with MySQL via 127.0.0.1, all dbs with INNODB) the largest discrepancy between D6 and D7 comes from the time it takes to open a db connection.
In d6 this takes about 10% of the cached page request time (of 19 ms), in d7 it takes a whopping 35% (of 37 ms).
Note, this is seperate from the IPv6 issue many people run it to. I'm specifically using an ipv4-address. Using localhost takes > 1 second to wait on the first timeout.
I haven't found much on the why though. For those on Unices: sockets cannot be used on Windows. I do not use named pipes.
Comments
Comment #1
catchSubscribing.
Comment #2
heine commentedTo clarify the
When using 'localhost' vs. '127.0.0.1' as the database host, connecting to the database takes over 1 second, probably by having the system try an IPv6 connect, then falling back to IPv4. That's a separate issue I wanted to rule out in #1.
Comment #3
heine commentedComment #5
heine commentedFrom berdir
Comment #6
heine commentedDING DING DING. We have a winner.
With skip-name-resolve the page cache performance is near-IDENTICAL to that of D6.
Connection strings:
and
I would have expected the same effect of the name resolve on D6 and 7.
Comment #7
andypostGreat idea to change defaults for hostname in drupal setup from localhost to 127.0.0.1
Comment #8
jbrown commentedI think on unix localhost means that mysql will use a unix socket instead of TCP/IP. This is much preferable. Windows is being stupid.
Comment #9
heine commentedjbrown, we already know about sockets (and named pipes for that matter).
Apparantly, PDO vs. mysqli leads to some new delay when name resolution is enabled and the db is accessed via tcp/ip.
If you have nothing of value to say, please refrain from commenting.
Comment #10
jbrown commentedSorry - I was trying to be of value.
It's important that the default is not changed from localhost to 127.0.0.1
Perhaps we can include some logic where localhost is converted to 127.0.0.1 by Drupal when on Windows?
Comment #11
heine commentedThe delay relative to D6 happens when 127.0.0.1 is used.