Go Back   Pligg CMS Forum > Other > Suggestions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-09-2007, 02:02 PM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
PHP accelerator for Pligg

Hello All

Today I came across this story at Digg "Surviving the Digg effect" http://creativebits.org/webdev/survi...he_digg_effect

There was a good suggestion on PHP accelerator http://en.wikipedia.org/wiki/PHP_accelerator - that article seemed to use http://eaccelerator.net/

will this be of any use to us - requiring your comments/feedback on this.
Reply With Quote
  #2 (permalink)  
Old 04-09-2007, 02:26 PM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
Eaccelerator is quite a nice module

http://www.ducea.com/2006/10/30/php-accelerators/
A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times

shared host's might not have this, and they can't add it themselves.
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
  #3 (permalink)  
Old 04-09-2007, 02:33 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by dollars5 View Post
Hello All

Today I came across this story at Digg "Surviving the Digg effect" http://creativebits.org/webdev/survi...he_digg_effect

There was a good suggestion on PHP accelerator http://en.wikipedia.org/wiki/PHP_accelerator - that article seemed to use http://eaccelerator.net/

will this be of any use to us - requiring your comments/feedback on this.
I saw a noticeable difference once I installed eaccelerator.
Reply With Quote
  #4 (permalink)  
Old 04-09-2007, 02:38 PM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
acidride: You mean you bosted the performance of Pligg with eaccelerator. If so it would be kind of you to detail on the steps of how you achieved it and any special changes to Pligg for this, together with CPU Cycle reduction and time of serving reduction.

TIA
Reply With Quote
  #5 (permalink)  
Old 04-09-2007, 02:44 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by savant View Post
Eaccelerator is quite a nice module

http://www.ducea.com/2006/10/30/php-accelerators/
A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times

shared host's might not have this, and they can't add it themselves.
With eaccelerator and memcache, I think you can survive a normal digg effect on a dual quad core with 4GB mem, running pligg (especially if you cache some other parts of the front page). There are certain parts that I think don't get updated often, such as small tag clouds and categories that should be cached.

There are other things you should look at... including maybe switching from apache to lightspeed or lighthttpd. I've read that those are much faster. I find that the SQL, after this round of improvements is not what will bring your server down during a digg. It's the PHP and webserver performance.

I've run some import scripts dumping info into Pligg that will max out the CPU. PHP doesn't do hyperthreading or use the multiple CPU cores of a server well. I've seen that MySQL will use the cores to the limit, whereas the webserver just spikes up to 99% and has a hard time recovering.

Full text search is very expensive though. Someone had posted a search suggestion pulldown that shows popular tags. If you use that and have more users search by tags suggestions, you can also help survive a digg hit with fewer full text searches run.
Reply With Quote
  #6 (permalink)  
Old 04-09-2007, 02:49 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by dollars5 View Post
acidride: You mean you bosted the performance of Pligg with eaccelerator. If so it would be kind of you to detail on the steps of how you achieved it and any special changes to Pligg for this, together with CPU Cycle reduction and time of serving reduction.

TIA
Before eaccelerator, I had pligg front page running at about 9 seconds per page load. After eaccelerator on PHP 4.4, this reduced the time to 2 seconds per page. This is on a dedicated machine without anyone else (keep this in mind). Nevertheless, it is a 4 fold improvement.

This is what I am running.

eAccelerator
eAccelerator support enabled
Version 0.9.5
Caching Enabled true
Optimizer Enabled true
Memory Size 16,777,152 Bytes
Memory Available 9,256 Bytes
Memory Allocated 16,767,896 Bytes
Cached Scripts 283
Removed Scripts 0
Cached Keys 0

Directive Local Value Master Value
eaccelerator.check_mtime 1 1
eaccelerator.compress 1 1
eaccelerator.compress_level 9 9
eaccelerator.debug 0 0
eaccelerator.enable 1 1
eaccelerator.filter no value no value
eaccelerator.log_file no value no value
eaccelerator.name_space no value no value
eaccelerator.optimizer 1 1
eaccelerator.shm_max 0 0
eaccelerator.shm_only 0 0
eaccelerator.shm_prune_period 0 0
eaccelerator.shm_size 16 16
eaccelerator.shm_ttl 0 0

I still haven't played around with it more, but when I get a chance, I'll dump some benchmark info with and without the eAccelerator.

Make sure you also have Zend Optimizer on your webserver:

Zend Optimizer
Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 4 enabled
Optimization Pass 9 enabled
Zend Loader enabled
License Path no value

Also, strip out a lot of the modules and gunk you don't need in the webserver. I was horrified to see my new Cent-OS install have more cobwebs than the Adams Family boudoir.

Last edited by acidride; 04-09-2007 at 02:56 PM..
Reply With Quote
  #7 (permalink)  
Old 04-09-2007, 02:58 PM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
I have a dv-extreme from MT, I have currently removed all processes that I do not use including smtp, ns, and many more to get more memory on the server.

I dunot have Zend optimizer nor the eaccelarator is listed on the apps list here http://kb.mediatemple.net/article.php?id=239

Do I need to install them on my server? There seems to be no installation guide for both

BTW: what is your site and where is it hosted?
Reply With Quote
  #8 (permalink)  
Old 04-09-2007, 03:10 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by dollars5 View Post
I have a dv-extreme from MT, I have currently removed all processes that I do not use including smtp, ns, and many more to get more memory on the server.

I dunot have Zend optimizer nor the eaccelarator is listed on the apps list here http://kb.mediatemple.net/article.php?id=239

Do I need to install them on my server? There seems to be no installation guide for both

BTW: what is your site and where is it hosted?
You need to install eaccelerator and Zend opt on your server. But I don't how much these will help you on a DV account.

I tried dedicated virtual servers for a while when testing pligg and other websites I am building. They're certainly much much better than a standard shared host and gives you good control. However, memory and CPU, you will find are the biggest problem with most DV.

Many times you don't know if your burstable memory is actual physical ram or some swap disk ram. Once you hit that swap disk ram, you need divine intervention to keep system health steady. And you may get like 1/16 or less of a CPU core dedicated, which is like having 1/16 of my desktop CPU processing power. No good under real loads.
Reply With Quote
  #9 (permalink)  
Old 04-09-2007, 03:15 PM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
Agree m8 - this is for test purposes as of now and will move to the dedicated physical hosting of MT sooner. Thanks for helping.
Reply With Quote
  #10 (permalink)  
Old 04-09-2007, 06:00 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Thanks: 14
Thanked 126 Times in 61 Posts
Quote:
Originally Posted by savant View Post
shared host's might not have this, and they can't add it themselves.
Unfortunately very true. The host I use day to day, doesn't have any kind of php accelerator installed, or memcached. I asked about both, but they weren't interested. I have no idea what the security implications are on shared hosts anyway.
__________________

Reply With Quote
Reply

Thread Tools
Display Modes
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 On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Errors tcritic General Help 1 08-15-2007 01:28 PM
Submitting stories...again kingp Installation and Upgrade Help 5 05-07-2007 12:58 PM
cann't vote in pligg (buliding 802) haxhax Bug Report 27 03-10-2007 06:53 AM
dreamhost and validation image problem Xanatos Installation and Upgrade Help 17 01-17-2007 01:14 PM
/var/log/httpd/error_log messages gr8rcake Bug Report 3 01-28-2006 09:28 PM


Search Engine Friendly URLs by vBSEO 3.2.0