Go Back   Pligg CMS Forum > Other > Off-topic

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2007, 09:39 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
Scaling PHP in a High Load Environment

http://wiki.osuosl.org/display/howto...ad+Environment

Quote:
The cheapest way to get more out of your app is to utilize a byte-code compilier like eAccelerator or APC.

The goal of these packages is to reduce compile time for redundant objects / files (includes!). Out-of-the-box, PHP will compile everything across every request, which doesn't scale well at all, especially for large libraries like PEAR:B or Smarty. Using one of these options will speed up your apps considerably – which is why many PHP sites use these. It's a no-brainer.
might find interesting
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
  #2 (permalink)  
Old 04-15-2007, 11:02 AM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Quote:
Optimize your application

The first obvious thing you can do is to make sure your application isn't wasting resources. This means looking for things like:

* Redundant queries
* Bad or pointless looping
* Unnecessary database connections
Redundant queries are currently being worked on.
__________________
- Ash
Reply With Quote
  #3 (permalink)  
Old 04-15-2007, 12:16 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by savant View Post
Absolutely agree. eAccelerator or similar is important. This is a must for higher loads. I have it running on my server, and it makes a big noticeable difference even in small test loads.
Reply With Quote
  #4 (permalink)  
Old 04-15-2007, 12:18 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by AshDigg View Post
Redundant queries are currently being worked on.
Whereas one can always throw more webservers up in some load balancing scheme, it's a quite a bit harder to scale up the database. The optimizations you are doing are great. They're going to make a big difference down the road when one of the pligg sites hits it big! :-) or when you guys do start-up the Pligg hosting environment, this will be critically important.
Reply With Quote
  #5 (permalink)  
Old 04-15-2007, 11:35 PM
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 576
Thanks: 31
Thanked 24 Times in 20 Posts
good article, thanks for the post!
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
Reply With Quote
  #6 (permalink)  
Old 04-16-2007, 05:11 AM
Constant Pligger
 
Join Date: Feb 2007
Posts: 100
Thanks: 12
Thanked 1 Time in 1 Post
Quote:
It's best to do your rewrites or local configurations in your vhost .conf file instead of in an .htaccess file. Apache has to parse the .htaccess file across requests, since it's local. It is better practice to throw your Apache configurations into the .conf file to avoid that overhead.
Is this worth noting?
Reply With Quote
  #7 (permalink)  
Old 04-16-2007, 08:11 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
mbs348, possibly, but most people don't have access to their apache config file so Pligg can't rely on it.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #8 (permalink)  
Old 04-16-2007, 10:00 AM
Constant Pligger
 
Join Date: Feb 2007
Posts: 100
Thanks: 12
Thanked 1 Time in 1 Post
Quote:
Originally Posted by kbeeveer46 View Post
mbs348, possibly, but most people don't have access to their apache config file so Pligg can't rely on it.
this is true, but don't most people not even use .htaccess?

Would it be possible to include both, and users could delete the .htaccess if they could get at their .conf file?
Reply With Quote
  #9 (permalink)  
Old 04-16-2007, 10:45 AM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Thanks: 14
Thanked 126 Times in 61 Posts
I would say that if you want to tweak to those levels, then you should know enough about apache configuration to add what is required to the conf file - most sites will see no performance difference using htaccess compared to the conf file. I think it is a server configuration / performance issue, and not one for pligg to take responsibility for.
__________________

Reply With Quote
  #10 (permalink)  
Old 04-16-2007, 10:52 AM
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 576
Thanks: 31
Thanked 24 Times in 20 Posts
i can see where it would make a difference if you run a very large website, or have a high load environment (like this article was written for), but not most pligg users. some of us also run multiple websites, so a set httpd.conf isn't always going to work for every site and software.
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
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
My Pligg site disabled because of high SQL load rohitsax General Help 0 05-26-2007 01:22 AM
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