Page 1 of 1

Slow Httpd / Apache -- is ioncube the guilty?

Posted: Mon Dec 10, 2007 5:05 pm
by benji
Hi,

I've found my apache / httpd responding very very slow, its like, takes a lot of time to respond.

When loading webs its much slower than before, but when i download a file from this same server via http, it runs at full speed.

Also i've checked out the load while making my tests, it was only at 0.65. Memory was ok...

Also, i can say that Plesk http server at port 8443, runs really smooth, no slow feeling like the normal one at port 80. Photos go one by one loading, between loading each photo takes some seconds. Sloooww!

I have ASL 2.0, but i have tried to disable all of the ASL features and httpd still runs slow.

Also i've checked logs and I've found on error_log the following:

Failed loading /usr/lib64/php4/php_ioncube_loader_lin_4.3_x86_64.so: /usr/lib64/php4/php_ioncube_loader_lin_4.3_x86_64.so: cannot open shared object file: No such file or directory

Is this the problem? What else should I check.

The only changes i've made lately is to install ASL-2.0, and the ART kernel.

My server used to be very very fast at serving webs... ¿? May be i have hardware problems? I just dont know what to check out, but its really slow at serving webs.

I've also checked web's where no PHP is used, only html, they run at same slow speed than the php ones...

Thanks in advance.

Posted: Mon Dec 10, 2007 6:19 pm
by benji
I've been investigating.

I've removed /etc/php.d/ioncube-loader.ini file.

Since that file whas making apache load a module that didnt exist.

Also, there was another ini file wich loaded the right ioncube module, that is ioncube.ini .

Since i removed that file, and did httpd restart. My httpd seems to run smoother and faster, and no errors reported on /var/log/httpd/error_log

Hope that helps somebody.

Improve apache performance

Posted: Tue Dec 11, 2007 1:09 pm
by danami
There are a lot of things you can do to improve the performance of apache2 on a stock plesk box.

Here are some things that I would recommend tweaking to get more from apache:
/etc/httpd/conf/httpd.conf

Turn KeepAlives on and adjust the keppalive timeout

Code: Select all

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 1000

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 10
The stock apache2 loads a tonne of extra modules that plesk and your users no not use. Apache is complete bloatware with all these loaded! Here are some that I disable:

Code: Select all

#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule auth_ldap_module modules/mod_auth_ldap.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule asis_module modules/mod_asis.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule mem_cache_module modules/mod_mem_cache.so

If you aren't using a PHP opcode cacher then you need to start (also note that zend optimizer is NOT an optcode cacher!). I would recommend installing xcache. (you can run zend optimizer , iocube, and xcache together safely ... just be carefull as to the order that you place them in your php.ini file .. as sometimes they won't play nice together)

http://xcache.lighttpd.net/

Posted: Wed Dec 12, 2007 4:20 pm
by scott
On this subject, Ive got php-eaccelerator in the atomic channel. Also check out ab, it comes with apache. Its the defacto benchmarking tool.