[imp] single machine versus load balancing

Charlie Reitsma reitsmac at denison.edu
Thu Mar 20 12:44:17 PST 2003


I made two changes on my overloaded 500MHz Netra X1:
1) I increased the MySQL max_connections to 300
2) I added IonCube's php accelerator - this entailed changing the system shared
memory settings for solaris following the notes provided and a reboot.

The system is up over 1000 active sessions now and the load average is still
under 2.0. Before these changes I reported I had seen it as high as 50!

There is an odd php accelerator logging problem I am working through with Nick
Lindridge (accelerator's author). And I'll still load balance IMP over multiple
boxes but the current pain has been alleviated.

Many thanks to Eric and others for your help.

Quoting Eric Rostetter <eric.rostetter at physics.utexas.edu>:

> Quoting Charlie Reitsma <reitsmac at denison.edu>:
> 
> > It looks like all I have to do is add the zend_extension line to php.ini
> and
> > stop and start the apache server. I could do this now while the load is
> > building. Am I missing anything in the way of additional changes needed?
> 
> Basically.   There are other lines you can add to your php.ini file.  Mine
> says something like:
> 
> ; PHP Accelerator extension
> zend_extension="/usr/lib/php4/php_accelerator_1.3.4r1.so"
> phpa = On;
> phpa.tweaks = On;       ; code optimizer
> phpa.enable_php_memory_bug_workaround = 0   ; not normally needed
> phpa.cache_dir = /var/www/cache/php_accelerator
> phpa.file_perms = 400
> ; phpa.ignore_files = "/index.php,/a/help.php"
> ; phpa.ignore_dirs = "/data/WWW/site1/,/cache/"
> phpa.cache_file_prune_period = 4h
> phpa.cache_file_ttl = 1d
> phpa.shm_size = 12
> phpa.shm_key = 0xc0deb00
> phpa.shm_perms = 666        ; should be 600 if possible
> phpa.shm_release_at_exit = on
> phpa.shm_stats_check_period = 5m
> phpa.shm_ttl = 12h
> ; phpa.shm_ignore_files = "/index.php,/a/help.php"
> ; phpa.shm_ignore_dirs = "/data/WWW/site1/,/nocache/"
> phpa.shm_max_processes = 257    ; apache MaxClients+1 (or greater)
> phpa.shm_lock_threshold0 = 10
> phpa.shm_lock_threshold1 = 10
> phpa.shm_user = apache
> phpa.shm_group = apache
> 
> The important things are:
> 
> zend_extension="/usr/lib/php4/php_accelerator_1.3.4r1.so"
> phpa = On;
> phpa.cache_dir = /var/www/cache/php_accelerator
> phpa.shm_size = 12
> 
> Make sure the phpa.cache_dir points to some real directory with read/write
> permissions for the web server user.  The phpa_shm_size is something you
> will
> need to tune for your site (using the "phpa_cache_admin -mv" command) and
> defaults to 10MB.  I found that setting it to 12MB is about right for me...
> Depends on the number of files it is caching, etc.
>


More information about the imp mailing list