Apache tweaks

Hello,

I try to tweaks Apache as apparently it uses swap memory (not fine).

I use a PIV HT 3.0ghz with 1GB ram memory.

First of all I’ll upgrade my memory to 2GB.

But I have a question :

  • Did you compile apache with the MPM work or prefork ?

It will help me to define the maxclients, serverlimits (and/or threadlimit) for my box.

With top I’ve seen that a typical httpd use a size of 9708. So I’d like to set the maxclients to 100 (and 175 after upgrading to 2GB of ram)

I’ll also have a look of unused module to remove them. Could you please list the necessary interworx-cp module ?

Do you use the mod_status ?

And to finish, just to be sure, the general httpd.conf is in /etc/httpd/conf/httpd.conf and all vhost conf is in /etc/httpd/conf.d/domaine.conf ?

Also I’d like to tweaks Php and mysqld. I’ve seen that mysqld takes a lot of memory and put the loadaverage high.

Any advise will be welcome

Thanks
Pascal

InterWorx uses a seperate install of Apache than the web sites. You can mess with with one without messing with the other, but there is no guarentee InterWorx won’t overwrite your work later.

I forgot where InterWorx installs Apache for users, but you can use

httpd -l

(thats a lower case L) to list built-in modules. That won’t include modules loaded at run-time, though.

Hello,

Thanks.

Yes iworx use its own and separate httpd.conf for using interworx.

But there is for users, one main httpd.conf and a specific user httpd.conf whom are append to the main httpd.conf (not sure for the first one)

I’m sure that the users httpd.conf is located at /etc/httpd/conf.d/users_domaine.conf
But I’m not really sure that the main one is at /etc/httpd/conf/httpd.conf

Also, It appears that Apache has been compiled with the prefork.c module.

When you use a PIV with Hyper Threading, is it not better to compile it with the MPM worker.c module ?

Could you please confirm me these things.

Is it a good tweaks to see in “Top” the average size of Httpd and divide in total memory to set the maxclients ?

Thanks

ok last question.

What is for you the best backup solution ?

  • Do a “rsync --delete”
  • Do a “dump”

Thanks

rsync

Pascal,

Here at NEXCESS.NET, we like rsync better. File backups and restores tend to be easier to do with rsync than dump. You can also pass it through ssh for security. However, depending on your specific situation, it may be more advantageous to use dump over rsync.

Thanks Bojan,

As I already use rsync, I agree that it is very efficient. In fact I never test dump.

As we say, never change somethings working (lol not sure you say that in English, and my translation is surely not the best one :-p )

Thanks for your advise.

pascal

Also, could you please confirm me this :

"I’m sure that the users httpd.conf is located at /etc/httpd/conf.d/users_domaine.conf
But I’m not really sure that the main one is at /etc/httpd/conf/httpd.conf

Also, It appears that Apache has been compiled with the prefork.c module.

When you use a PIV with Hyper Threading, is it not better to compile it with the MPM worker.c module ?

Could you please confirm me these things.

Is it a good tweaks to see in “Top” the average size of Httpd and divide in total memory to set the maxclients ?
"

Thanks Bojan

That’s right pascal, the main apache config is /etc/httpd/conf/httpd.conf, which includes all *.conf files in /etc/httpd/conf.d/

Also, It appears that Apache has been compiled with the prefork.c module.

When you use a PIV with Hyper Threading, is it not better to compile it with the MPM worker.c module ?

So far the jury is out on this pascal and it’s unclear which is better. The fact that you have a PIV 3.0 shouldn’t make a huge difference in choosing an MPM. That said, I myself haven’t had a lot of time to test the worker MPM and I’d sure like to a bit more. From what I’ve read it’s less stable, for what that’s worth, but I assume any more that any instability has been addressed.

Is it a good tweaks to see in “Top” the average size of Httpd and divide in total memory to set the maxclients ?

Honestly, I ususally let the given boxes client load dictate maxclients. If you divide the avg httpd size into total mem you’re sure to swap if you hit maxclients so I’d just shoot lower and if you ever actually hit maxclients then readjust as needed.

Chris

ok thanks Chris :slight_smile: