Results 1 to 6 of 6
-
11-11-2005, 05:30 AM #1Junior Guru Wannabe
- Join Date
- Nov 2005
- Posts
- 78
Very slow apache/mysql performance
I have very strange situation, folks. I recently moved to dedicated server.
I have photo gallery and forum there (max 40 users at peak time).
Sometimes I cannot get to site through http, and when I run "free" command, I notice that all my memory is used up.
Mem: 506896 491948 14948 0 124988 165788
-/+ buffers/cache: 201172 305724
Swap: 2097136 43476 2053660
When I restart apache - I can get to site just fine, but after some time - same problem. So I have several questions:
1. Is my Mysql is bad? Should I upgrade?
2. Is problem with php, should I upgrade that?
3. Is it possible for somebody with very fast connect to hit my forum like hundred times to make mysql work and take up all my resources? If yes - how to limit mysql queries per IP to avoid abuse?
4. Is apache at fault? I already limited max clients to 130 in apache from default value.
Here is infor about my server:
Pentium IV CPU 2.4
Memory: 512MB RAM
Fedora Core 2
PHP: 4.3.11
MySql: 3.23.58
Webserver: Apache/2.0.51 (Fedora)
Loaded Modules core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest util_ldap mod_auth_ldap mod_log_config mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_speling mod_alias mod_webapp mod_rewrite mod_cache mod_disk_cache mod_file_cache mod_mem_cache mod_perl sapi_apache2 mod_python mod_ssl mod_logio
mySql settings:
mysql.allow_persistent On
mysql.connect_timeout 60
mysql.max_links Unlimited
mysql.max_persistent Unlimited
mysql.trace_mode Off
php settings:
allow_call_time_pass_reference Off
allow_url_fopen On
always_populate_raw_post_data Off
asp_tags Off
define_syslog_variables Off
display_errors Off
display_startup_errors Off
enable_dl On
error_reporting 2047
expose_php On
file_uploads On
gpc_order GPC
html_errors On
ignore_repeated_errors Off
ignore_repeated_source Off
ignore_user_abort Off
implicit_flush Off
log_errors On
log_errors_max_len 1024
magic_quotes_gpc Off
magic_quotes_runtime Off
magic_quotes_sybase Off
max_execution_time 30
max_input_time 60
memory_limit 32M
post_max_size 8M
precision 14
register_argc_argv On
register_globals Off
report_memleaks On On
safe_mode Off
safe_mode_gid Off
sendmail_path /usr/sbin/sendmail -t -i
serialize_precision 100
short_open_tag On
sql.safe_mode Off
track_errors Off
upload_max_filesize 2M
-
11-11-2005, 05:44 AM #2Web Hosting Master
- Join Date
- Dec 2003
- Location
- NY & PA
- Posts
- 850
well there are some updates you can run like
Upgrade MySQL as that version is a little old.
Edit the my.cnf file better so it helps the MySQL██ Robert Merrihue - President/CEO
██ http://www.bethehost.com
██ Where resellers become a host on servers we own and operate.
██ Web Hosting Since 2000 *** 12+ Years in the hosting industry
-
11-11-2005, 05:46 AM #3Web Hosting Master
- Join Date
- Dec 2003
- Location
- NY & PA
- Posts
- 850
Also are you running Cpanel
██ Robert Merrihue - President/CEO
██ http://www.bethehost.com
██ Where resellers become a host on servers we own and operate.
██ Web Hosting Since 2000 *** 12+ Years in the hosting industry
-
11-11-2005, 05:49 AM #4Junior Guru Wannabe
- Join Date
- Nov 2005
- Posts
- 78
RobM: thank you for your reply. What values would you suggest changing (considering specs of my server mentioned above) in my.cnf ?
Also, when I run 'ps aux' I get several of those:
mysql 2471 0.0 3.7 44204 18892 ? S Nov01 2:36 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
mysql 2472 0.0 3.7 44204 18892 ? S Nov01 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
mysql 2473 0.0 3.7 44204 18892 ? S Nov01 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
Is that normal? Total of 10 right now. Shouldn't there be just one mysql process?
And yes, I run Plesk 7.5 (reloaded). That's why I need to do lot of research before upgrading php/mysql
-
11-11-2005, 06:49 AM #5Aspiring Evangelist
- Join Date
- Jan 2004
- Location
- York, UK
- Posts
- 371
Is is normal for MySQL (and Apache, and a number of other common server daemons) to maintain a pool of processes/threads - so 10 MySQL's listed in "ps aux" isn't a problem.
-
11-11-2005, 09:32 PM #6Junior Guru Wannabe
- Join Date
- Nov 2005
- Posts
- 78
anyone can suggest me ways to improve performance, please?