Log in

View Full Version : PHP and Database Queries question


markbolyard
02-01-2006, 05:12 PM
Just curious if someone could look at this set of stats and explain something to me.

I have made a copy of another website (exact duplicate) on a different server. I ran a search for some text, same search term, same search method, etc on both sites.

The old site stats for that search:

Page generated in 0.28921604 seconds (75.27% PHP - 24.73% MySQL) with 10 queries

The new site stats for that search:

Page generated in 1.85268402 seconds (14.76% PHP - 85.24% MySQL) with 10 queries

The sites are duplicates of one another. They both have the same number of queries. But the % of php relative to Mysql is opposite.

Why would this be. I ask because the new site is significantly slower and I am trying to figure out why.

Thanks for any help you could give me.

the Sandman
02-01-2006, 05:18 PM
What are the specs of the two servers and what version of PHP and MySQL are each running?

Xenon
02-01-2006, 06:35 PM
looks like a misconfiguration of mysql on the new server

markbolyard
02-01-2006, 06:54 PM
Actually, I think I have found my answer. The old host uses this setup:

Web Site
Dual 1.13Ghz CPU, 2GB RAM, Hardware RAID
Email
Dual 1.13Ghz CPU, 2GB RAM, Hardware RAID
Email Backup
Dual 933Mhz CPU, 512MB RAM, Hardware RAID
Databases
Dual 1.26Ghz CPU, 2GB RAM, Hardware RAID
Primary DNS
Single 1.2Ghz CPU, 512MB RAM, Hardware RAID
Secondary DNS
Single 1.2Ghz CPU, 512MB RAM, Hardware RAID
Control Panel
Dual 1.4Ghz CPU, 1.5GB RAM, Hardware RAID

Each process per say, has it's own server just to handle that particular function, where the new host is a single machine. Could this explain the differences?

Xenon
02-01-2006, 10:16 PM
yep, a single machine will be always slower than two servers, one for db, one for the rest :)