News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

PHP 5x and MySQL 4.1x

Started by Ben_S, January 05, 2005, 05:52:06 PM

Previous topic - Next topic

Ben_S

I know SMF works with both the above, but are there any performance advantages to using them?

Getting silly amounts of traffic now[but generally handling it fairly easilly] and am looking to get as much performance out of the box as possible.
Liverpool FC Forum with 14 million+ posts.

[Unknown]

I've seen page generations go down 20% with PHP 5.

MySQL 4.1 seems to be fast to me, but I've never done a production test or anything.

-[Unknown]

Ben_S

Interesting, might give PHP5 a try and MySQL 4.1, something for a quiet weekend me thinks.
Liverpool FC Forum with 14 million+ posts.

Ben_S

Well, tried PHP5 and wasn't too impressed, heres my totally unscientific benchmark results (bear in mind site was live at the time so server was under load so these cannot be relied upon.)

Test server is a P4 3GHz with 1 GB RAM.

PHP 4.3.10 no accelerators - This test was carried out at approx 12am with about 250 users online in the past 30 mins.

board index

Page created in 0.053 seconds with 6 queries.
Page created in 0.062 seconds with 8 queries.
Page created in 0.058 seconds with 6 queries.

message index

Page created in 0.201 seconds with 14 queries.
Page created in 0.16 seconds with 14 queries.
Page created in 0.204 seconds with 15 queries.
Page created in 0.169 seconds with 15 queries.

topic

Page created in 0.262 seconds with 19 queries.
Page created in 0.113 seconds with 18 queries.
Page created in 0.142 seconds with 18 queries.
Page created in 0.118 seconds with 19 queries.

PHP 4.3.10 & PHP Accelerator - This test was carried out at approx 9pm with about 400 users online in the past 30 mins.

board index

Page created in 0.034 seconds with 6 queries.
Page created in 0.032 seconds with 6 queries.
Page created in 0.032 seconds with 6 queries.

message index

Page created in 0.133 seconds with 12 queries.
Page created in 0.21 seconds with 12 queries.
Page created in 0.192 seconds with 10 queries.
Page created in 0.134 seconds with 12 queries.
Page created in 0.308 seconds with 10 queries.

topic

Page created in 0.109 seconds with 17 queries.
Page created in 0.087 seconds with 16 queries.
Page created in 0.101 seconds with 16 queries.
Page created in 0.082 seconds with 16 queries.

PHP 5.0.3 no accelerators - This test was carried out at approx 12:20am with about 250 users online in the past 30 mins.

board index

Page created in 0.074 seconds with 6 queries.
Page created in 0.07 seconds with 8 queries.
Page created in 0.15 seconds with 8 queries.
Page created in 0.071 seconds with 8 queries.

boardindex

Page created in 0.43 seconds with 13 queries.
Page created in 0.234 seconds with 15 queries.
Page created in 0.518 seconds with 12 queries.
Page created in 0.22 seconds with 14 queries.

topic

Page created in 0.126 seconds with 19 queries.
Page created in 0.276 seconds with 18 queries.
Page created in 0.435 seconds with 19 queries.
Page created in 1.931 seconds with 18 queries.

I also tried PHP 5 with mmcache, but they aren't fully compatable and it was spitting errors into the apache error log, page gen times for the board index were about 0.07 - 0.03, never did the full tests as the load began to rise.

As I had mmcache downloaded, I thought I may as well recompile it and test it with PHP 4.3.10, heres the results for that.

PHP 4.3.10 mmcache - This test was carried out at approx 12:44am with about 230 users online in the past 30 mins.

board index

Page created in 0.036 seconds with 9 queries.
Page created in 0.034 seconds with 8 queries.
Page created in 0.032 seconds with 6 queries.

message index

Page created in 0.138 seconds with 14 queries.
Page created in 0.14 seconds with 14 queries.
Page created in 0.141 seconds with 16 queries.

topic

Page created in 0.084 seconds with 16 queries.
Page created in 0.088 seconds with 18 queries.
Page created in 0.185 seconds with 18 queries.

And again PHP 4.3.10 & PHP Accelerator @12:50am with 230 users ish online.

board index

Page created in 0.032 seconds with 6 queries.
Page created in 0.034 seconds with 8 queries.
Page created in 0.033 seconds with 6 queries.

message index

Page created in 0.138 seconds with 14 queries.
Page created in 0.134 seconds with 15 queries.
Page created in 0.166 seconds with 14 queries.

topic

Page created in 0.088 seconds with 18 queries.
Page created in 0.089 seconds with 18 queries.
Page created in 0.148 seconds with 19 queries.

From that, phpa and mmcache seem to perform pretty much as good as each other, so I'm going to stick with phpa as it doesn't need recompiling after every php upgrade.

PHP 5 seemed to perform slower than with PHP4 for whatever reason, will be interesting to try it again when mmcache is compatable with PHP 5.

Others have had great results with PHP5 and mmcache, and like I said, these tests cannot be relied on as the box was under load at all times.
Liverpool FC Forum with 14 million+ posts.

Advertisement: