request tweaking 2 servers
i think my servers needs configurations and i really need help
i have 2 server
1-1st it currently
is used for apache, mail, dns, ftp
CPU: Dual 3.06 Ghz XEON (with HT)
Memory: 4 gb ram
Hard Drive : 120 GB
Cpanel
100mbps
.................................................. .
2another server is currently used for mysql Only for
p4 3.06 ghz (with HT)
2gb ram
there problem whith connect to mysql ... i think we need some tweak settings
plz advice me what can we do
3. if you use mysql 4.x instead of mysql 3.23.x, do you have any innodb type databases/tables on your server ? im not sure about that
4. your top stats
for mysql server :
10:01:44 up 6 days, 6:17, 1 user, load average: 0.24, 0.23, 0.25
150 processes: 147 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 15.7% 0.0% 3.7% 4.7% 2.1% 0.0% 73.4%
Mem: 2026252k av, 1981600k used, 44652k free, 0k shrd, 100104k buff
538640k actv, 1060076k in_d, 30276k in_c
Swap: 2048276k av, 2680k used, 2045596k free 1640144k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
1886 mysql 15 0 143M 143M 2644 S 3.9 7.2 0:43 0 mysqld
1935 mysql 15 0 143M 143M 2644 S 2.1 7.2 0:18 0 mysqld
1929 mysql 15 0 143M 143M 2644 S 1.9 7.2 0:54 0 mysqld
1938 mysql 15 0 143M 143M 2644 S 1.9 7.2 0:13 0 mysqld
615 mysql 15 0 143M 143M 2644 S 1.5 7.2 0:37 0 mysqld
1927 mysql 15 0 143M 143M 2644 S 1.1 7.2 0:11 0 mysqld
1944 mysql 15 0 143M 143M 2644 S 1.1 7.2 0:06 0 mysqld
1855 mysql 15 0 143M 143M 2644 S 0.9 7.2 0:56 0 mysqld
1887 mysql 15 0 143M 143M 2644 S 0.9 7.2 2:12 0 mysqld
1888 mysql 15 0 143M 143M 2644 S 0.7 7.2 0:53 0 mysqld
1943 mysql 15 0 143M 143M 2644 S 0.7 7.2 0:12 0 mysqld
1906 mysql 15 0 143M 143M 2644 S 0.5 7.2 2:40 0 mysqld
1942 mysql 15 0 143M 143M 2644 S 0.5 7.2 0:03 0 mysqld
1934 mysql 15 0 143M 143M 2644 S 0.3 7.2 0:16 0 mysqld
1997 root 15 0 1192 1192 896 R 0.1 0.0 0:00 0 top
1 root 15 0 508 508 452 S 0.0 0.0 0:04 0 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd/0
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
5 root 15 0 0 0 0 SW 0.0 0.0 0:01 0 kswapd
6 root 15 0 0 0 0 SW 0.0 0.0 0:10 0 kscand
8 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated
9 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd
16 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 scsi_eh_0
[1]+ Stopped top 0 SW 0.0 0.0 0:00 0 scsi_eh_1
[root@mysql root]# 0 0 0 0 SW 0.0 0.0 3:00 0 kjournald
top for httpd server
10:01:45 up 2 days, 9:15, 1 user, load average: 3.53, 1.64, 0.83
205 processes: 202 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 6.9% 4.2% 6.9% 0.4% 1.7% 35.1% 44.3%
cpu00 5.9% 4.5% 5.3% 0.7% 2.9% 38.0% 42.2%
cpu01 5.1% 10.5% 7.1% 0.0% 2.1% 39.8% 35.0%
cpu02 7.5% 1.7% 9.3% 0.0% 0.9% 31.2% 49.0%
cpu03 9.1% 0.0% 5.9% 1.1% 0.9% 31.4% 51.1%
Mem: 4101372k av, 3152240k used, 949132k free, 0k shrd, 29176k buff
2361612k actv, 461052k in_d, 66080k in_c
Swap: 8193140k av, 42968k used, 8150172k free 1812352k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
5655 nobody 15 0 15624 15M 3344 S 1.4 0.3 2:27 0 httpd
2484 root 34 19 14568 14M 1732 D N 1.2 0.3 1:46 3 cpanellogd
10909 nobody 15 0 15412 15M 3284 D 1.2 0.3 1:28 2 httpd
13927 nobody 15 0 15380 15M 3284 D 0.5 0.3 1:12 2 httpd
10886 nobody 15 0 15576 15M 3292 S 0.4 0.3 1:34 3 httpd
14193 nobody 15 0 15444 15M 3284 S 0.4 0.3 1:05 2 httpd
10529 nobody 15 0 15440 15M 3288 S 0.3 0.3 1:52 3 httpd
17092 nobody 16 0 15424 15M 3284 D 0.3 0.3 0:54 2 httpd
26258 nobody 15 0 16096 15M 3284 D 0.3 0.3 0:35 1 httpd
27694 nobody 15 0 15424 15M 3284 D 0.3 0.3 0:22 0 httpd
6837 nobody 15 0 15260 14M 3244 D 0.3 0.3 0:00 3 httpd
7484 nobody 15 0 7948 7948 3216 S 0.3 0.1 0:00 1 httpd
29706 nobody 15 0 15580 15M 3292 D 0.2 0.3 4:21 2 httpd
15881 nobody 15 0 11456 11M 3284 R 0.2 0.2 0:59 3 httpd
6439 nobody 15 0 15360 15M 3252 R 0.2 0.3 0:04 3 httpd
14 root 15 0 0 0 0 SW 0.1 0.0 0:15 2 kupdated
9996 nobody 15 0 15612 15M 3308 D 0.1 0.3 3:59 3 httpd
12763 nobody 15 0 7772 7772 3288 D 0.1 0.1 1:21 1 httpd
12766 nobody 16 0 15608 15M 3292 D 0.1 0.3 1:20 2 httpd
13075 nobody 15 0 15500 15M 3284 S 0.1 0.3 1:06 3 httpd
25622 nobody 15 0 15408 15M 3268 S 0.1 0.3 0:30 1 httpd
[1]+ Stopped top 3268 D 0.1 0.3 0:06 2 httpd
root@server1 [~]# 0 15360 15M 3280 D 0.1 0.3 0:06 0 httpd
6. your mysql configuration variables
fot mysql server :
[root@mysql root]# cat /etc/my.cnf
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=
# MASTER_USER=
#
# where you replace
#
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host =
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user =
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port =
#
# binary logging - not required for slaves, but recommended
#log-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using BDB tables
#bdb_cache_size = 384M
#bdb_max_lock = 100000
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[root@mysql root]#
7.for httpd server :
[mysqld]
set-variable = max_connections=500
safe-show-database
8. is your vB the only thing on the server? or other scripts & sites which utilise php and mysql? no i have PHPNUKE with 1000 ONline users and vb with 500 users online and 4images script with 150 users online .
and what your cookie timeout is ? its 9000
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 950
VB version 3.0.7
http://7oob.net/phpinfo.php
thats all
Warm Regards
sorry for no reply my hard drive on my pc died so limited access as was trying to recover data off the drives.
Regards,
its ok Eva ... i have but my forums in one server alone so its good now ..
thats all :)
Regards
#If you have any other info about this subject , Please add it free.# |