Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Sun Sep 11, 2011 7:29 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:45 pm
Posts: 63
mattm wrote:
Thoughts on having suphp enabled on a server with only 1 domain? Won't be shared hosting...

I don't think there's a point, just set Apache to run as whatever user; www-data for instance. Actually, since suphp executes scripts as the owner's user it is potentially less secure than a discrete www-data user. On a shared server of course it's more important to isolate users from each other.


Top
   
 Post subject:
PostPosted: Mon Sep 12, 2011 3:41 pm 
Offline
Junior Member

Joined: Sun Mar 21, 2010 11:19 pm
Posts: 45
Do you think it's more resource intensive? Or noticeable if I were disable it?


Top
   
 Post subject:
PostPosted: Mon Sep 12, 2011 6:23 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:45 pm
Posts: 63
mattm wrote:
Do you think it's more resource intensive? Or noticeable if I were disable it?

Yes, suphp is more resource intensive. Presumably your script would run identically, only as www user.


Top
   
 Post subject:
PostPosted: Tue Sep 13, 2011 10:47 am 
Offline
Junior Member

Joined: Sun Mar 21, 2010 11:19 pm
Posts: 45
Just an update on where I'm at for those following along or possibly researching the same issue:

Code:
Timeout 120
TraceEnable On
ServerSignature Off
ServerTokens Full
FileETag All
StartServers 5
<IfModule prefork.c>
MinSpareServers 5
MaxSpareServers 10
</IfModule>
ServerLimit 256
MaxClients 100
MaxRequestsPerChild 5000
KeepAlive Off
KeepAliveTimeout 2
MaxKeepAliveRequests 100


I've enabled W3TC Plugin and Cloudflare: http://www.cloudflare.com/wiki/W3TC

I just added W3TC as of this post, so the attached image shows the first drop in load/bandwidth saved, but it's normalizing right now.

Image


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 10:08 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 12:57 pm
Posts: 16
rsk wrote:
Guspaz wrote:
It requires setting up PHP as a fastcgi

Just remember to use mod_fastcgi, not mod_fcgid.


Could you elaborate on this?
I am currently not running PHP on my MPM worker instance, but my current understanding was that the fcgid package is better maintained and is the superior option.


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 4:42 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Disclaimer: I don't have any experience with FPM (Noooot going to compile PHP myself, tyvm); maybe mod_fcgid works better with it.

Anyway. "Standard" php-fastcgi can work in two modes.
In one, you spawn a single "php worker process", that's handling one request at a time.
That mode is fine with both mod_fastcgi, and mod_fcgid. You use the Apache modules "process management" features, and it's the mod_* that spawns and kils PHP subprocesses as it needs them. Quite like the MinSpareServers/MaxSpareServers/MaxClients directives work for Apache's own workers.

The other mode, which's obtained by setting PHP_FCGI_CHILDREN=<number> before starting php-fastcgi, starts a "master dispatcher" process, that spawns the number of children you've told it to, and "pipelines" multiple requests in parallel through itself to the subprocesses.
That mode is necessary to have APC work, because APC uses shared memory, and needs all PHP processes to be forked from the dispatcher to have access to it.

Using APC with the "simple PHP workers" would cause each of them to have its own cache. Quite pointless.

Now, mod_fcgid doesn't do pipelining.
If you'll use fcgid to spawn a php dispatcher tree, it'll see only the single process it started itself (the dispatcher), and it'll feed it one request at a time, and wait for it to complete before it sends the next one.
So, in result, you'll have all the php-children except one idling, and you'll be processing one php script at a time, period.

mod_fastcgi does pipelining, and thus lets you run your php dispatcher->children tree, making use of all the parallel workers, and letting them share the APC cache between them.

Seems like an easy decision to me.

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
 Post subject:
PostPosted: Thu Oct 27, 2011 6:21 pm 
Offline
Newbie

Joined: Thu Oct 27, 2011 6:09 pm
Posts: 2
Location: United States
Offload all media to Amazon CDN? Offload all JS and CSS to Amazon CDN? Or JS ( like jQuery ) to Google ?


The average 'text' page load is 32KB. Do that hosting math on that. The rich experience is the kicker.

If you even need a 1024 after that, I'd be surprised. My similar setup is getting 2k hits per second on a 1024.


Top
   
 Post subject: Replace apache
PostPosted: Wed Nov 16, 2011 11:51 am 
Offline
Junior Member
User avatar

Joined: Wed Nov 16, 2011 11:41 am
Posts: 37
Website: http://empoweringmedia.com
Location: United States
First thing I would recommend in your situation is replace apache for that amount of hits/sec. I would recommend litespeed for at least a drop in replacement and features.

Outside of that I would need to see more than your traffic metrics. What other metrics do you monitor? hits/sec, CPU, memory, disk io? I know Linode offers some of this but I do not see any post related to these graphs.

_________________
Larry Ludwig
Empowering Media
Managed Cloud Services and Managed VPS


Top
   
 Post subject: Re: graphing
PostPosted: Wed Nov 16, 2011 12:01 pm 
Offline
Junior Member
User avatar

Joined: Wed Nov 16, 2011 11:41 am
Posts: 37
Website: http://empoweringmedia.com
Location: United States
Ericson578 wrote:
mattm wrote:
Here you can see my graphs before the system seized up for running out of memory.

https://skitch.com/mattmm/fsi1f/linode- ... node124975


Sorry to be off topic, but I'm looking to start monitoring my box too, what are you using to generate these graphs, and does it use a web interface?

Thanks!


I recommend Cacti which is built on top of rrdtool.

_________________
Larry Ludwig

Empowering Media

Managed Cloud Services and Managed VPS


Top
   
 Post subject: ntop
PostPosted: Wed Nov 16, 2011 1:14 pm 
Offline
Junior Member

Joined: Fri Jul 08, 2011 7:46 pm
Posts: 44
Website: http://ericsonwilkinson.me
Location: United States
I'm using ntop to monitor my box's traffic io. It has a webfrontend that is on port 3000, but I only open it up to the IP address I happen to be on.

I'm still learning how to interpret the info.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group