Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Using Apc; Benchmarks
xuk
post Jan 5 2008, 04:17 PM
Post #1


Beginner
*

Group: Members
Posts: 5
Joined: 5-January 08
Member No.: 19,650



Here is my benchmarks of using Openads 2.4 with and without a php accelerator.

OS: Linux Debian Etch
Hardware: AMD Athlon 64 X2 6000+ with 8GB of RAM.
Openads was showing more then 4mil. impr. daily before using APC.

CPU load was too high so I started thinking about some optimization.

Below are graphs of our monitoring system.
You can easily see changes after APC has been installed.

CPU
http://img151.imageshack.us/my.php?image=cpuop5.png

Average response time of the PHP fastcgi server.
http://img218.imageshack.us/img218/7554/avgresptimeqh3.png

Requests per second. For some unknown reason it has been increased so much.
http://img220.imageshack.us/my.php?image=reqspersecyd8.png

Conclusion: PHP accelerators really help. Wonder why there in the docs is no clear advice of using an accelerator.
Go to the top of the page
 
+Quote Post
ChrisNutting
post Jan 7 2008, 09:12 AM
Post #2


Master
Group Icon

Group: OpenX Developers
Posts: 634
Joined: 22-February 05
From: London
Member No.: 4,311



Well... we kind of do... we have a page on Performance Tuning, which gives some tips on improving performance:

https://developer.openads.org/wiki/PerformaceTuning

This only becomes really relevant as your site increases traffic, so it's considered advanced
Go to the top of the page
 
+Quote Post
Oliver George
post Jan 8 2008, 02:16 PM
Post #3


Expert
****

Group: Members
Posts: 182
Joined: 10-October 06
From: London
Member No.: 13,148



Hi Xuk

I had a quick chat with Andrew, one of the Snr Devs at Openads and asked him how to interpret the data you sent through.

Looking at the load we wondered if you were initially CPU bound. The way of proving this would be to look at a graph of CPU utilisation. Do you have access to that data? Also, it would be interesting to look for a Disk utilisation graph too.

The other piece of info which would be particularly interesting would be response time. The graph you initially posted as unreadable (it came through as a thumbnail).

cheers, Oliver
Go to the top of the page
 
+Quote Post
xuk
post Jan 8 2008, 03:16 PM
Post #4


Beginner
*

Group: Members
Posts: 5
Joined: 5-January 08
Member No.: 19,650



QUOTE (olivergeorge @ Jan 8 2008, 02:16 PM) *
Looking at the load we wondered if you were initially CPU bound. The way of proving this would be to look at a graph of CPU utilisation. Do you have access to that data?


The CPU data is the first graph in the original post.
Had I posted that in a wrong way?

QUOTE
Also, it would be interesting to look for a Disk utilisation graph too.


There is almost no disk utlization because the server has 8GB or RAM and the database is still quite small.
Even the maintenance script runs every few minutes in few second.

QUOTE
The other piece of info which would be particularly interesting would be response time. The graph you initially posted as unreadable (it came through as a thumbnail).

cheers, Oliver


Sorry, I have just corrected the original post.
http://img218.imageshack.us/img218/7554/avgresptimeqh3.png
Go to the top of the page
 
+Quote Post
xuk
post Jan 8 2008, 03:25 PM
Post #5


Beginner
*

Group: Members
Posts: 5
Joined: 5-January 08
Member No.: 19,650



Actually almost all CPU resources are used by PHP.
Mysql uses only less then 10% of CPU.
This is a common example of using a script language in high-load environment.

Below is the current top output.

CODE
# top
top - 15:18:31 up 7 days,  3:25,  1 user,  load average: 1.85, 1.86, 1.68
Tasks: 137 total,   1 running, 136 sleeping,   0 stopped,   0 zombie
Cpu(s): 37.0%us,  5.5%sy,  0.0%ni, 54.1%id,  1.8%wa,  0.0%hi,  1.7%si,  0.0%st
Mem:   8151860k total,  8099152k used,    52708k free,  2086980k buffers
Swap:  2097144k total,     8612k used,  2088532k free,  4968584k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND
18867 test      15   0 50160 7300 4896 S   14  0.1   0:47.40  41m php5-cgi
18869 test      16   0 50152 7384 4896 S   14  0.1   0:42.87  41m php5-cgi
18866 test      15   0 50164 7264 4896 S   12  0.1   0:51.50  41m php5-cgi
18868 test      15   0 50332 7520 5060 S   12  0.1   0:46.99  41m php5-cgi
18870 test      15   0 50152 7384 4896 S   12  0.1   0:40.82  41m php5-cgi
12867 mysql     15   0  454m 398m 5464 S    6  5.0 342:19.96  55m mysqld
2574 www       15   0 45756  18m 1004 S    2  0.2  85:36.00  26m nginx
2573 www       16   0 45756  18m 1004 S    2  0.2  85:45.61  26m nginx
2576 www       15   0 45756  18m  968 S    2  0.2  85:09.95  26m nginx
2577 www       16   0 45756  18m  964 S    2  0.2  84:54.25  26m nginx
Go to the top of the page
 
+Quote Post
Oliver George
post Jan 8 2008, 03:31 PM
Post #6


Expert
****

Group: Members
Posts: 182
Joined: 10-October 06
From: London
Member No.: 13,148



Hi Xuk

I'm struggling with Zabbix a little, not sure if I can get those reports easily. For your interest here are a few points on system performance data.

Your CPUs are a finite resource. A CPU utilisation graph would show how busy they are as a number between 0% and 100%. Similarly, you can only write/read so much data to your disks in any space of time. A disk utilisation graph represents how busy the interface to the disk is.

The CPU and Disk I/O are two finite resources which can cause a bottleneck to you ad serving performance which makes it interesting to look at how busy they are.

The graph showing "processor load" seems to be system load graph which is a count of the number of processes waiting for system resources (like CPU or I/O). It's a general indication of how heavily loaded the system is.

I should say, I'm not a professional unix system administrator. I'm sure someone would be able to offer corrections but I think the basics are there.

cheers, Oliver
Go to the top of the page
 
+Quote Post
xuk
post Jan 9 2008, 04:20 AM
Post #7


Beginner
*

Group: Members
Posts: 5
Joined: 5-January 08
Member No.: 19,650



QUOTE (olivergeorge @ Jan 8 2008, 03:31 PM) *
Your CPUs are a finite resource. A CPU utilisation graph would show how busy they are as a number between 0% and 100%. Similarly, you can only write/read so much data to your disks in any space of time. A disk utilisation graph represents how busy the interface to the disk is.
.......


Thank you for the explanation :-)
Well, I know what does that all mean, or at least since I'm considering myself as a professional sysadmin I hope that I know :-)

I just tried to point you that PHP is used too much CPU for its job and mysql is almost unnoticeable.
In my opinion it means that there is something wrong with either a design of software or a installation.
Go to the top of the page
 
+Quote Post
Oliver George
post Jan 9 2008, 08:29 AM
Post #8


Expert
****

Group: Members
Posts: 182
Joined: 10-October 06
From: London
Member No.: 13,148



QUOTE (xuk @ Jan 9 2008, 04:20 AM) *
QUOTE (olivergeorge @ Jan 8 2008, 03:31 PM) *
Your CPUs are a finite resource. A CPU utilisation graph would show how busy they are as a number between 0% and 100%. Similarly, you can only write/read so much data to your disks in any space of time. A disk utilisation graph represents how busy the interface to the disk is.
.......


Thank you for the explanation :-)
Well, I know what does that all mean, or at least since I'm considering myself as a professional sysadmin I hope that I know :-)

I just tried to point you that PHP is used too much CPU for its job and mysql is almost unnoticeable.
In my opinion it means that there is something wrong with either a design of software or a installation.



Hi Xuk,

I understand where you are coming from. Openads is consuming a lot of resources on your system but I think the load you are seeing is to be expected if you are serving 120 million ad impressions each month.

I can assure you we've done a lot of work to make Openads as efficient as possible. The ad server functionality requires some quite clever algorithms to ensure that the most valuable ad is served to each website visitor and that each campaign meets performance targets. It's also logging data to give you statistics and reports.

You might like to go through the performance tuning tips that Chris linked you to. We'd be very interested to hear what other performance gains you see.

cheers, Oliver
Go to the top of the page
 
+Quote Post
xuk
post Jan 9 2008, 04:44 PM
Post #9


Beginner
*

Group: Members
Posts: 5
Joined: 5-January 08
Member No.: 19,650



QUOTE (olivergeorge @ Jan 9 2008, 08:29 AM) *
Openads is consuming a lot of resources on your system but I think the load you are seeing is to be expected if you are serving 120 million ad impressions each month.


More then 120.
The site has 1m pageviews daily and there is 7 ad zones.
So it's about 210ml.
Go to the top of the page
 
+Quote Post
vscope
post Mar 7 2008, 05:37 PM
Post #10


Beginner
*

Group: Members
Posts: 2
Joined: 7-March 08
Member No.: 20,520



https://developer.openads.org/wiki/PerformaceTuning

I get a page not found error here - anyone know where it went?
Go to the top of the page
 
+Quote Post
nguyenvantho
post Mar 8 2008, 08:04 AM
Post #11


Advanced Member
***

Group: Members
Posts: 31
Joined: 29-August 07
From: Viet nam
Member No.: 17,870



now they change it to:
http://www.openx.org/docs/2.4/whitepapers/performance-tuning
Go to the top of the page
 
+Quote Post
Arlen Coupland
post Mar 10 2008, 12:11 PM
Post #12


Mentor
Group Icon

Group: OpenX Support
Posts: 7,549
Joined: 28-November 06
From: London, England
Member No.: 14,171



Hi,

Thanks for the post nguyen - sorry for the missing link
Go to the top of the page
 
+Quote Post
amenadiel
post Jun 7 2008, 01:44 AM
Post #13


Beginner
*

Group: Members
Posts: 4
Joined: 17-May 08
Member No.: 21,382



I'm sorry to revive an old post, but I wanted to ask you guys: do you think it matters which php accelerator I use?

Currently, I run OpenX 2.4 on a machine with lighttpd and xcache. ¿Do you think this is worse than apache+APC?
Go to the top of the page
 
+Quote Post
Rob3Jane
post Jun 18 2008, 10:36 PM
Post #14


Advanced Member
***

Group: Members
Posts: 40
Joined: 15-August 07
Member No.: 17,689



QUOTE (amenadiel @ Jun 6 2008, 06:44 PM) *
I'm sorry to revive an old post, but I wanted to ask you guys: do you think it matters which php accelerator I use?

Currently, I run OpenX 2.4 on a machine with lighttpd and xcache. ¿Do you think this is worse than apache+APC?


I prefer Xcache with lighttpd, over APC. We did some testing with our setup and found Xcache to be a slight advantage on performance. I also prefer Xcache's user interface to APC's. I haven't done any testing with Xcache + Apache, because I can't get Apache to come even close to lighttpd's performance with our OpenX setup.
Go to the top of the page
 
+Quote Post
Oliver George
post Jun 18 2008, 10:42 PM
Post #15


Expert
****

Group: Members
Posts: 182
Joined: 10-October 06
From: London
Member No.: 13,148



Interesting, good to know. Thanks Rob3Jane.

cheers, Oliver
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

 

Locations of visitors to this page