Slow Httpd / Apache -- is ioncube the guilty?

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
benji
Forum User
Forum User
Posts: 63
Joined: Thu Mar 29, 2007 10:32 am

Slow Httpd / Apache -- is ioncube the guilty?

Unread post 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.
benji
Forum User
Forum User
Posts: 63
Joined: Thu Mar 29, 2007 10:32 am

Unread post 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.
danami
Forum User
Forum User
Posts: 16
Joined: Wed Feb 21, 2007 7:56 pm

Improve apache performance

Unread post 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/
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
Post Reply