N
Naruto
Misafir
teşekkürler iyinet.
CPU kullanimin cok yuksek.
MySQL sorgularinin optimize edilmesi gerektigini ve bazi indexlerin eksik oldugunu dusunuyorum.
PHP icin EAccelerator kurulu degil ise kurmak gerekiyor.
my.cnf icine onceki eklediklerini cikartip yerine asagidaki satirlari ekle:
my.cnf kodlarını değiştirdim , son durum bu
Load Average cok yuksek!
Load Average normalde 2 yi gecmemeli, ideal olan 1 den kucuk olmasi.
MySQL ayarlari icin yapilacak pek fazla bisey yok.
Kullandigin uygulama nedir? Tablolarin Indexleri varmi?
top - 13:43:30 up 6 days, 5:18, 1 user, load average: 2.32, 9.64, 8.18
Tasks: 274 total, 5 running, 256 sleeping, 1 stopped, 12 zombie
Cpu(s): 24.7% us, 5.4% sy, 1.1% ni, 42.8% id, 25.8% wa, 0.2% hi, 0.0% si
Mem: 970404k total, 950712k used, 19692k free, 13992k buffers
Swap: 1966072k total, 399212k used, 1566860k free, 191268k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13025 nobody 16 0 24604 12m 2412 S 36.7 1.3 0:00.83 /usr/local/apache/bin/httpd -DSSL
13120 nobody 25 0 24796 12m 2496 R 32.8 1.3 0:14.56 /usr/local/apache/bin/httpd -DSSL
13199 nobody 25 0 24616 12m 2412 R 21.2 1.3 0:06.00 /usr/local/apache/bin/httpd -DSSL
1644 mysql 15 0 187m 50m 2404 S 5.8 5.3 8:38.09 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/lin
13045 nobody 15 0 19676 7744 2276 S 1.9 0.8 0:00.07 /usr/local/apache/bin/httpd -DSSL
amd 3100 , 1gb ram centos 4.4 ve cpanel mevcut önereceğiniz my.cnf değerleri nedir acaba? ram çok kullanılıyor...
coppermine'm var , birde phpadsnew kullanıyorum tüm site üzerinde ,tablo ve indexi tam anlamadım özür , ayrıca bir arkadaşımın , günlük ziyaretçisi 100 geçmeyen , içinde 4image resim albümlü , phpbb forumu var..
teşekkürler
RPM ile kurulmus ise /etc/my.cnf altinda olur.
Orada yoksa, "locate my.cnf" komutu ile arattir.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_allowed_packet=160M
max_connections=500
query-cache-type=1
query-cache-size=32M
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
top - 22:38:04 up 1 day, 7:59, 1 user, load average: 3.70, 3.78, 3.46
Tasks: 183 total, 2 running, 179 sleeping, 0 stopped, 2 zombie
Cpu(s): 36.0% us, 12.7% sy, 0.3% ni, 49.9% id, 1.1% wa, 0.0% hi, 0.0% si
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=500
safe-show-database
bind-address=127.0.0.1
log-slow-queries = /var/log/mysql_slow_query.log
connect_timeout=50
thread_cache_size=64
key_buffer_size=64M
join_buffer=1M
tmp_table_size=32M
max_allowed_packet=16M
record_buffer=1M
sort_buffer_size=1M
read_buffer_size=1M
[mysql.server]
user=mysql
#basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
root@server [~]#
Sunucu:
Amd 64 3800+
2 GB Ram
Teşekkürler.
top - 14:31:12 up 3 days, 19:16, 2 users, load average: 0.09, 0.10, 0.09
Tasks: 118 total, 1 running, 117 sleeping, 0 stopped, 0 zombie
Cpu(s): 12.0% us, 1.2% sy, 0.0% ni, 86.9% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 2066112k total, 1885888k used, 180224k free, 35272k buffers
Swap: 2096472k total, 160k used, 2096312k free, 1669548k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9992 apache 16 0 24152 15m 9m S 18.0 0.8 1:11.36 /usr/sbin/httpd -DH
10085 apache 15 0 23980 15m 9m S 2.0 0.8 1:13.11 /usr/sbin/httpd -DH
9759 apache 15 0 23984 15m 9m S 1.0 0.8 1:06.13 /usr/sbin/httpd -DH
9748 root 16 0 22104 13m 9888 S 0.3 0.7 0:00.96 /usr/sbin/httpd -DH
10104 apache 15 0 23980 15m 9m S 0.3 0.8 1:01.66 /usr/sbin/httpd -DH
10494 apache 15 0 24152 15m 9m S 0.3 0.8 1:01.71 /usr/sbin/httpd -DH
28839 root 16 0 1972 992 756 R 0.3 0.0 0:00.03 top -c
1 root 16 0 3572 528 452 S 0.0 0.0 0:00.75 init [3]
2 root RT 0 0 0 0 S 0.0 0.0 0:00.19 [migration/0]
3 root 34 19 0 0 0 S 0.0 0.0 0:00.01 [ksoftirqd/0]
4 root RT 0 0 0 0 S 0.0 0.0 0:00.19 [migration/1]
5 root 34 19 0 0 0 S 0.0 0.0 0:00.00 [ksoftirqd/1]
6 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 [events/0]
7 root 5 -10 0 0 0 S 0.0 0.0 0:00.01 [events/1]
8 root 7 -10 0 0 0 S 0.0 0.0 0:00.00 [khelper]
9 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 [kacpid]
25 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 [kblockd/0]
sadece 500 tekilli 1 oyun sitesi var 2 gb ram p4 3.2 yardımların için teşekkürler şimdiden iyinet
Sorun nedir ?
top - 02:16:04 up 8 days, 7:33, 1 user, load average: 1.20, 1.07, 0.86
Tasks: 91 total, 2 running, 89 sleeping, 0 stopped, 0 zombie
Cpu(s): 17.1% us, 1.6% sy, 0.0% ni, 0.7% id, 79.9% wa, 0.7% hi, 0.0% si
Mem: 969756k total, 102608k used, 867148k free, 724k buffers
Swap: 1959920k total, 81180k used, 1878740k free, 30652k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12200 apache 15 0 26580 7560 5516 S 6.3 0.8 2:17.13 httpd
18365 apache 15 0 26596 7740 5624 S 4.7 0.8 1:26.99 httpd
22511 apache 15 0 26584 7796 5608 S 3.0 0.8 0:56.70 httpd
20957 apache 16 0 26584 7708 5616 S 1.0 0.8 1:09.64 httpd
21134 apache 15 0 26628 7884 5608 S 1.0 0.8 1:08.74 httpd
28176 drweb 16 0 5324 3160 1660 S 1.0 0.3 0:00.03 update.pl
8467 mysql 16 0 131m 9764 3480 S 0.3 1.0 6:30.42 mysqld
24604 apache 15 0 26636 7996 5712 S 0.3 0.8 0:36.38 httpd
1 root 16 0 1892 424 396 S 0.0 0.0 0:00.47 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.05 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 events/0
4 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
24 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
34 root 15 0 0 0 0 S 0.0 0.0 0:00.72 pdflush
35 root 15 0 0 0 0 S 0.0 0.0 0:00.57 pdflush
37 root 10 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
Amd 64 Athlon 4000+
1 GB Ram
CentOS 4
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_connections = 650
key_buffer = 256M
myisam_sort_buffer_size = 256M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 4M
table_cache = 1500
thread_cache_size = 384
wait_timeout = 15
connect_timeout = 10
tmp_table_size = 256M
max_heap_table_size = 256M
max_allowed_packet = 64M
max_connect_errors = 1000000
read_rnd_buffer_size = 1M
bulk_insert_buffer_size = 16M
query_cache_limit = 12M
query_cache_size = 256M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
sunucum linux ,mywedding bu ayarlar sadece Linux sunucu içinmi? windows için olurmu?