Hello,
I am in the process of optimizing the setup for performance after moving a site from Dreamhost shared to Dedicated server.
I'm running exactly the same code and database on dedicated server and on Dreamhost shared server.
Looking at the page renedering time (Using the devel module) I'm seeing ~700 msec on the Dreamhost Shared and ~2500msec on the dedicated server which is brand new and does not have traffic at all.
I checked the SQL log (again devel module) and on Dreamhost i see Executed 215 queries in 420.03 microseconds while on the dedicates server I'm seeing Executed 215 queries in 169.38 microseconds.
So the dedicated server is much faster in SQL performance but it renders the pages slower.
Could someone give me a clue on where to look for the bottleneck on the dedicated server ?
Thanks,
Nir
Comments
Performance depends on many factors
The main two are:
- Hardisk: most of MySQL operations
- CPU: PHP related calculation
There are some bottlenecks, like:
- RAM
- Bandwidth
- System-bus
- Bad configuration
You have to figure out whether both installations resume nearly the same CPU consumption or not.
A way to to a "stress test" ist to mirror the sites with "# wget -m SITE".
Hope this helps a bit.
Thomas Narres
Keep the sunny side up
I know but it still does not explain it
Thanks for the help.
In this situation the Dedicated Server (which shows slower page creation time) is not constrained in RAM, Bandwidth or System bus.
The issue is probably CPU , bad configuration or both. My question is how to focus on the right thing to configure following the above findings.
Do you have shell access?
if yes, try tools like top, sar
Thomas Narres
Keep the sunny side up
I forgot to say, that
http://www.xdebug.org/ may be used with the devel.module
Thomas Narres
Keep the sunny side up
Top for the dedicated server
top - 04:35:59 up 12:51, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 83 total, 2 running, 79 sleeping, 2 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 99.0% id, 1.0% wa, 0.0% hi, 0.0% si
Mem: 1028340k total, 195784k used, 832556k free, 26244k buffers
Swap: 2650684k total, 0k used, 2650684k free, 74288k cached
I don't think that the dedicated server has load issues. It is not receiving traffic.
Is it CPU ?
I on the Dreamhost /proc/cpuinfo shows 4 different processors (Xeon at 2.8Ghz) On the dedicated server there's just one (3Ghz Pentium) Could this be the reason ?
In multi CPU environment is the load of a single page serving divided between the CPUs?
Virtual?
Are you sure this is a real (physical) dedicated server and not a virtual private / virtual dedicated?
On my Xen VPS, I see two Xeon CPUs, which are the physical server's real CPUs.
If your host is running Xen, you will see two processes called xenwatch and xenbus, but there are other virtualizers (e.g. Virtuosso).
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba
Is it possible to measure the PHP performance only?
Do you know of any script I can use that does not use mysql and shows the performance of the PHP execution engine only ?
Further, Is there a way to seperately check performance of PHP, MySQL and Apache each exclusively ?
The load tests I know of show the combination of the factors by measuring the time it takes a page to render or the average time of creating many pages simulataneously. How can I seperate the factors ( PHP, MySQL and Apache, Memory, Disk ) and test them individually ?
xdebug extension
which can be found at http://www.xdebug.org/ may be used with the devel.module, too.
Thomas Narres
Keep the sunny side up
simpletest.module
You may try to use the simpletest.module, which does some stress tests and you should have a look at your "top"-window.
Maybe you will see that CPU is consuming all resources.
Thomas Narres
Keep the sunny side up
wow.... I didn't realize it was so much work to get a *dedicated
wow.... I didn't realize it was so much work to get a *dedicated* server with good specs to perform well... i thought you just bought the machine, installed the applications and then... boom...
maybe not, eh?
i was thinking about getting a dedicated server like the one at layered tech -- (following in your footsteps, nbd) ... but i'm getting a bit intimidated by all of the technicalities...
maybe it's possible to outsource admin management like this? i've heard of places like rack911 or platinumservermanagement -- but maybe this is too complicated and technical even for them?
Just a thought... and keep us posted on how you're doing... [If you get it working, I might be bugging you for advice in a bit, myself!] :-)
Albert
www.ithou.org
It is a lot of work
Just the main steps I took (from the top of my head) New server => updated php +updated apache + updated mysql + performance benchmarks + installed accelerator + installed& configured firewall + installed& configured bruteforce protection + imported my software + imported my databases + configurated my software + changed SSH ports + performance benchmarks. setup cronjobs, setup email accounts, transfer registrar, create name server, point to new site...
Now the optimization starts...
Hey, there, nbd... did you fix this?
Just curious... if you were able to fix this... and how...
I'm thinking about Layered Tech and wanted to know if it was safe to jump in the water! :-)
Albert
www.ithou.org
Didn't fix it yet...
Will update you when there's progress
All I can say is that I got many advices from webmasters against running dedicated server by myself, since I don't have Linux experience.
I did it against the advice and so far it looks OK. I don't recommend it at all unless you are ready to jump water and learn as you go while sometimes banging your head against the wall. But I would have done it again in the same situation because I belive that it is worthwhile to spend more time and effort in the short run if you learn and gain knowledge that will be useful along the road.
By the way I'm the last person you want to learn about dedicated servers from because I probably have the least experience.
I do recommend webhostingtalk.com. The people there are very helpful.
I would of course be more than happy to help if I can.
-Nir
outsourced admin
The other option is to just pay a bit of a premium for someone like RackSpace's Intensive hosting where they will assist in troubleshooting your problems. I'm just speaking from reading their marketing materials, not personal experience, but that is an option as well.
Regards,
Greg
--
Growing Venture Solutions
Drupal Implementation and Support in Denver, CO
--
Morris Animal Foundation
Accelarator
Could it be that the shared host has an accelator that is different from the one you have on the dedicated server?
If you get phpinfo() from both environments, you will know if this is the case?
It may be installed but not enabled?
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba