Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-01-2008, 01:26 AM php benchmark?
Sharon_leic's Avatar
Super Talker

Posts: 115
Name: Sharon
Location: Leicester, uk
Trades: 0
Hiya

While i am writing my website i am now hosting it myself, the php, database and everything using Wamp
http://www.wampserver.com/

( works nicely i must say )

anyway, is there any programs that i can run on my pc to test the site to get an idea of the speed my php scripts can run at, how many concurrent users will be able to view the same page without me hitting to big a bottleneck and so on?

Thanks for your help

Shaz x
__________________
mysql_connect("localhost", "brain", "sharon") or die(mysql_error());
mysql error: brain doesn't exist!
Sharon_leic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-01-2008, 07:35 AM Re: php benchmark?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Your best call is to run several tools:

1) Xdebug [ http://www.xdebug.org ]
This is a debugger and profiler for PHP. Once the profiler is enabled, it will save a file that contains many information telling how many times each functions have been called, and how much time they took to be ran.
You can use a program named wincachegrind [ http://sourceforge.net/projects/wincachegrind ] to analyze that trace.

Do this page after page, and you will see where are the bottlenecks in your code.
Most of the times, they are in the database related functions.
But too, this will let you know if a specific functions is called too many time. It could be good to optimize it.

2) To test the load, use something like apache's fundation jmeter [ http://jakarta.apache.org/jmeter/ ].
It will allow you to plot and simulate hundreds of concurernt connections, and how many time your server took to respond.
You can find a basic explaination about how to setup a web page test plan here: http://jakarta.apache.org/jmeter/use...test-plan.html

But take care to disable xdebug profiler, as the profiler slows down your scripts, or you will have thousands of trace files to clean up.

here is a web page test ploted result:



I don't know about wamp, but I know that xampp provide the xdebug extension by default.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-02-2008, 01:24 AM Re: php benchmark?
Sharon_leic's Avatar
Super Talker

Posts: 115
Name: Sharon
Location: Leicester, uk
Trades: 0
Thanks for all that info
I do have to check it all over and over again because everything runs so fast when hosting it on your own pc but i'm sure when its on the web it will all fall apart hehe

I will have a look at Wamp for the xdebug extension although not seen anything of it yet.

I think the only real database bottlenecks my site will hit is if the roulette gets played by a few people at once as it does make a lot of calls to the database on each spin or bet placing.. and it makes calls to 3 different fields.
other than that the only real heavy thing on database is viewing profiles as all there details and guestbookin there, forums evidently makes a fair few calls but thats split into pages so not all at once.

codewise, i think 2 of my includes my slow things down a little, 1 being my smile finder and the other the cookie reader.

Thanks again for all the info

Shaz x
__________________
mysql_connect("localhost", "brain", "sharon") or die(mysql_error());
mysql error: brain doesn't exist!

Last edited by Sharon_leic; 03-02-2008 at 01:25 AM..
Sharon_leic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php benchmark?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.62123 seconds with 12 queries