İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

MySQL CPU Kullanımı my.cnf optimizasyonu

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
smf ve hazır portallar mevcut onlarda sanırım mutlaka vardır innodb seçeneği ona göre yazabilirseniz sevinirim. teşekkür ederim

asagidaki ayarlari [mysqld] altina ekleyin:

innodb_buffer_pool_size=64M
innodb_additional_mem_pool_size=32M
innodb_thread_concurrency=8
innodb_flush_method=O_DIRECT

Genele:
Innodb kullanan arkadaslar, [mysqld] altina bellek boyutlarina gore asagidaki innodb ayarlarini ekleyebilirler.

1Gb ve alti bellek icin:
innodb_buffer_pool_size=64M
innodb_additional_mem_pool_size=32M
innodb_thread_concurrency=8
innodb_flush_method=O_DIRECT

2Gb bellek icin:
innodb_buffer_pool_size=256M
innodb_additional_mem_pool_size=64M
innodb_thread_concurrency=8
innodb_flush_method=O_DIRECT

4Gb bellek icin: (Innodb kullanimi cok ise 384M, 1024M e kadar arttirilabilir)
innodb_buffer_pool_size=384M
innodb_additional_mem_pool_size=96M
innodb_thread_concurrency=8
innodb_flush_method=O_DIRECT
 

Lord21

0
İyinet Üyesi
Katılım
11 Ocak 2008
Mesajlar
78
Reaction score
0
[mysqld] altini asagidaki sekilde degistir, diger bolumler ayni kalsin.

[mysqld]
default-character-set=latin5
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-name-resolve
query_cache_size=50M
query_cache_type=1
query_cache_limit = 4M
key_buffer = 32M
max_allowed_packet = 64M
max_connections=300
table_cache = 5000
thread_cache_size = 128
low_priority_updates = 1



Dediğini yaptığımda load 10 dan aşağı inmemeye başLadı:) Eskisi gibi yapınca düştü eski yerine.
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
Makine özellikleri:

P4 3.0
2 GB ram
CentOS 4
Plesk 8 (Innodb kullanıyor)

Şu anki my.cnf:


[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

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Nasıl optimize etmem gerektiği hakkında yönlendirirseniz sevinirim.
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Dediğini yaptığımda load 10 dan aşağı inmemeye başLadı:) Eskisi gibi yapınca düştü eski yerine.

tuning-primer ciktiniza bakarsaniz mysql e baglanamayan kullanicilar oldugunu goreceksiniz.
Baglanti sayisini arttirarak mysql i daha cok kullaniciya actiniz.
MySQL i kullanicilara kapatirsaniz load dusuk olacaktir haliyle.
max_connections=1
yapin load cok daha asagilara dusecektir :)
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya

mrtcbks

0
İyinet Üyesi
Katılım
17 Ekim 2007
Mesajlar
167
Reaction score
0
Selam iyinet my.cnf çıktım aşagıdaki gibi

HTML:
[mysqld]
set-variable = max_connections=500
safe-show-database

Makina özelliklerime gelince
Intel Xeon-Harpertown 5420-Quadcore
4 işlemci 2.5ghz ve her işlemcide 6mb cache var 4 GB ram kullanmakta sunucu sizce nasıl bir uygulama yapabiliriz? forum siteleri mevcut sunucu üzerinde.

Teşekkürler
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Selam iyinet my.cnf çıktım aşagıdaki gibi

HTML:
[mysqld]
set-variable = max_connections=500
safe-show-database
Makina özelliklerime gelince
Intel Xeon-Harpertown 5420-Quadcore
4 işlemci 2.5ghz ve her işlemcide 6mb cache var 4 GB ram kullanmakta sunucu sizce nasıl bir uygulama yapabiliriz? forum siteleri mevcut sunucu üzerinde.

Teşekkürler

@mrtcbks, once bellege gore mysql my.cnf ayarlari başlığındaki hazır ayarlardan uygun olanını kullan.
Ardından 2-3 gün sonra mysql performans raporunu alarak sonuçları postala. Gerekirse ek ayar yapalım.
 

mrtcbks

0
İyinet Üyesi
Katılım
17 Ekim 2007
Mesajlar
167
Reaction score
0
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 4.1.22-standard i686
Uptime = 0 days 6 hrs 7 min 37 sec
Avg. qps = 76
Total Questions = 1680984
Threads Connected = 3
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service
SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 17 out of 1681014 that take longer than 10 sec. to complete
Your long_query_time may be too high, I typically set this under 5 sec.
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/4.1/en/point-in-time-recovery.html
WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 126
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 750
Current threads_connected = 2
Historic max_used_connections = 173
The number of used connections is 23% of the configured maximum.
Your max_connections variable seems to be fine.
MEMORY USAGE
Max Memory Ever Allocated : 634 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 170 M
Configured Max Memory Limit : 2 G
Physical Memory : 3.95 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 816 M
Current key_buffer_size = 128 M
Key cache miss rate is 1 : 491
Key buffer fill ratio = 45.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 30 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 96.12 %
Current query_cache_min_res_unit = 4 K
However, 449262 queries have been removed from the query cache due to lack of memory
Perhaps you should raise query_cache_size
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 132.00 K
You have had 4699 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.
OPEN FILES LIMIT
Current open_files_limit = 6760 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
TABLE CACHE
Current table_cache value = 3000 tables
You have a total of 972 tables
You have 669 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 27559 temp tables, 4% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 2484 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 279
You may benefit from selective use of InnoDB.


Bu arada mysql % 117 şu an teşekkürler
 

mrtcbks

0
İyinet Üyesi
Katılım
17 Ekim 2007
Mesajlar
167
Reaction score
0
HTML:
[mysqld]
set-variable = max_connections= 750
safe-show-database
skip-locking 
skip-name-resolve
thread_cache_size = 128
key_buffer = 128M
query_cache_type = 1
query_cache_size = 32M
query_cache_limit = 4M
table_cache = 3000 
low_priority_updates = 1
innodb_buffer_pool_size=384M
innodb_additional_mem_pool_size=96M
innodb_thread_concurrency=8
innodb_flush_method=O_DIRECT

Bu şekilde my.cnf conf Xcache de kurdum iyinet teşekkürler şimdiden.


Intel Xeon-Harpertown 5420-Quadcore
4 işlemci 2.5ghz ve her işlemcide 6mb cache var 4 GB ram centos 4.4 işletim sistemi ve Cpanel bulunmakta
 

Murat

0
İyinet Üyesi
Katılım
5 Eylül 2006
Mesajlar
85
Reaction score
0
-rasgele veri çekmekde mysql u yorar mı hit bir site için?
-Sunucuda 10 site aktif diyelim 20 de mysql db si kurulu 10 u kullanılmıyor script deneme amaçlı açılmış olsun. diğer aktif 10 sitenin mysql kullanımını etkilermi yavşlatırmı kullanılmayan dbler?
- En çok merak ettiğim hangi domainin db sinin ne kadar cpu tukettiği mysql ı zorladığı bunu nasıl %100 tesbit ederiz?
 

ENVER

0
İyinet Üyesi
Katılım
21 Eylül 2006
Mesajlar
492
Reaction score
0
vps kullanıyorum bunun için yardımcı olabilir misin

top - 14:21:16 up 2 days, 3:41, 1 user, load average: 64.13, 39.98, 40.46
Tasks: 291 total, 11 running, 276 sleeping, 3 stopped, 1 zombie
Cpu(s): 66.8% us, 29.1% sy, 0.0% ni, 2.7% id, 1.4% wa, 0.0% hi, 0.0% si
Mem: 786432k total, 513020k used, 273412k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached



my.cnf içeriğide

[mysqld]
set-variable = max_connections=500
safe-show-database


teşekkürler
 

bloodyking

0
İyinet Üyesi
Katılım
10 Mart 2008
Mesajlar
0
Reaction score
0
Merhaba

VPS kullanıyorum 768 mb ram var ancak bazen ram kullanımı aşırı artıyor.

my.cnf içeriği bu şekilde. Nasıl optimize edebiliriz yardımcı olabilir misiniz?

Kod:
[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
     
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
 

Pehepe

0
İyinet Üyesi
Katılım
20 Şubat 2008
Mesajlar
22
Reaction score
0
Bu bir vps sadece bır forum var ve konu acarken cok bekliyor sayfa acılışları hızlı fakat dedim gıbı konu acarken cok bekliyor (çok düşünüyor)

load average: 0.73, 0.76, 0.82

Tasks: 68 total, 1 running, 67 sleeping, 0 stopped, 0 zombie

Cpu(s): 6.7% us, 1.3% sy, 0.0% ni, 91.9% id, 0.2% wa, 0.0% hi, 0.0% si

Mem: 1048576k total, 348164k used, 700412k free, 0k buffers

Swap: 0k total, 0k used, 0k free, 0k cached

[mysqld]

port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
 

yunuss

0
İyinet Üyesi
Katılım
2 Mayıs 2008
Mesajlar
2
Reaction score
0
yüksek Load Average

selamlar

linux ve plesk 8.3 yüklü vps hesabı aldım ve 20 basit site 5 de database attım daha ağır siteleri taşımadım fakat sunucu günede 4-5 defa nerdeyse durma noktasına geliyor
my.cnf ve bir kaç teknik döküm aşağıda sizce ne yapmam gerek

my.cnf
Kod:
[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
     
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2

top -n1
Kod:
[root@linux ~]# top -n1
top - 00:24:13 up 2 days,  7:36,  1 user,  load average: 0.02, 0.01, 0.12
Tasks:  59 total,   1 running,  58 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1% us,  0.0% sy,  0.0% ni, 93.1% id,  6.7% wa,  0.0% hi,  0.0% si
Mem:    524288k total,   210252k used,   314036k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  1700  488  464 S    0  0.1   0:00.11 init
 3938 root      18   0  8576 2548 1980 S    0  0.5   0:00.03 sshd
 5140 apache    15   0 27776 4540 2700 S    0  0.9   0:00.43 httpd
 5148 apache    15   0 27300 4212 2672 S    0  0.8   0:00.43 httpd
 5403 root      16   0  5380 1400 1176 S    0  0.3   0:00.02 bash
 7507 root      19   0  4444  616  588 S    0  0.1   0:00.03 couriertcpd
 7513 root      17   0  3476  780  744 S    0  0.1   0:00.03 courierlogger
 7559 root      21   0  4440  588  584 S    0  0.1   0:00.00 couriertcpd
 7561 root      25   0  3344  596  592 S    0  0.1   0:00.00 courierlogger
 7593 root      15   0  4440  652  604 S    0  0.1   0:00.58 couriertcpd
 7597 root      16   0  3476  808  752 S    0  0.2   0:00.46 courierlogger
 7619 root      24   0  4440  588  584 S    0  0.1   0:00.00 couriertcpd
 7621 root      20   0  3340  596  592 S    0  0.1   0:00.00 courierlogger
 8191 root      18   0 27072 2164 2080 S    0  0.4   0:00.58 httpd
 9231 apache    18   0 17928  548  520 S    0  0.1   0:00.14 httpd
 9287 named     24   0 46576 1540 1140 S    0  0.3   0:01.00 named
 9362 root      22   0  5380  904  900 S    0  0.2   0:00.00 mysqld_safe
 9396 mysql     15   0 99.6m 4820 2780 S    0  0.9   0:13.32 mysqld
10170 apache    16   0 37024 5140 3152 S    0  1.0   0:06.46 httpd
10239 apache    15   0 27400 4004 2768 S    0  0.8   0:00.63 httpd
11287 apache    15   0 34068 4984 3228 S    0  1.0   0:00.81 httpd
11389 apache    15   0 27400 4172 2788 S    0  0.8   0:00.62 httpd
11391 apache    15   0 33328 5040 3288 S    0  1.0   0:00.59 httpd
11392 apache    15   0 27360 4816 2944 S    0  0.9   0:00.48 httpd
11534 postgres  18   0 19948 1228 1112 S    0  0.2   0:00.27 postmaster

iptables --list -n |wc -l
Kod:
[root@linux ~]# iptables --list -n |wc -l
8

ps -ef
Kod:
[root@linux ~]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Apr29 ?        00:00:00 init [3]
root      3938 30027  0 00:14 ?        00:00:00 sshd: root@pts/0
apache    5140  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache    5148  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
root      5403  3938  0 00:15 pts/0    00:00:00 -bash
root      7507     1  0 Apr29 ?        00:00:00 /usr/lib/courier-imap/couriertcp
root      7513     1  0 Apr29 ?        00:00:00 /usr/sbin/courierlogger imapd
root      7559     1  0 Apr29 ?        00:00:00 /usr/lib/courier-imap/couriertcp
root      7561     1  0 Apr29 ?        00:00:00 /usr/sbin/courierlogger imapd-ss
root      7593     1  0 Apr29 ?        00:00:00 /usr/lib/courier-imap/couriertcp
root      7597     1  0 Apr29 ?        00:00:00 /usr/sbin/courierlogger pop3d
root      7619     1  0 Apr29 ?        00:00:00 /usr/lib/courier-imap/couriertcp
root      7621     1  0 Apr29 ?        00:00:00 /usr/sbin/courierlogger pop3d-ss
root      8191     1  0 Apr29 ?        00:00:00 /usr/sbin/httpd
apache    9231  8191  0 Apr29 ?        00:00:00 /usr/sbin/httpd
named     9287     1  0 Apr29 ?        00:00:01 /usr/sbin/named -u named -c /etc
root      9362     1  0 Apr29 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --d
mysql     9396  9362  0 Apr29 ?        00:00:13 /usr/libexec/mysqld --defaults-f
apache   10170  8191  0 Apr29 ?        00:00:06 /usr/sbin/httpd
apache   10239  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   11287  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   11389  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   11391  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   11392  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
postgres 11534     1  0 Apr29 ?        00:00:00 /usr/bin/postmaster -p 5432 -D /
postgres 11632 11534  0 Apr29 ?        00:00:00 postgres: stats buffer process
postgres 11633 11632  0 Apr29 ?        00:00:00 postgres: stats collector proces
root     12226     1  0 Apr29 ?        00:00:01 /usr/bin/spamd --username=popuse
popuser  13614 12226  0 Apr29 ?        00:00:00 spamd child
root     13785     1  0 Apr29 ?        00:00:00 /usr/local/psa/admin/bin/httpsd
psaadm   13828 13785  0 Apr29 ?        00:00:04 /usr/local/psa/admin/bin/httpsd
psaadm   13888 13785  0 Apr29 ?        00:00:05 /usr/local/psa/admin/bin/httpsd
qmails   14111     1  0 May01 ?        00:00:00 qmail-send
qmaill   14113 14111  0 May01 ?        00:00:00 splogger qmail
root     14114 14111  0 May01 ?        00:00:00 qmail-lspawn | /usr/bin/deliverq
qmailr   14115 14111  0 May01 ?        00:00:00 qmail-rspawn
qmailq   14116 14111  0 May01 ?        00:00:00 qmail-clean
psaadm   14183 13785  0 Apr29 ?        00:00:03 /usr/local/psa/admin/bin/httpsd
drweb    14228     1  0 Apr29 ?        00:00:19 /opt/drweb/drwebd
root     14289     1  0 Apr29 ?        00:00:00 crond
root     14302     1  0 Apr29 ?        00:00:00 /usr/sbin/saslauthd -m /var/run/
apache   16368  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   18212  8191  0 Apr30 ?        00:00:04 /usr/sbin/httpd
apache   19983  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   19989  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   19990  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   20000  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   20001  8191  0 May01 ?        00:00:01 /usr/sbin/httpd
apache   20003  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
root     20152  5403  0 00:28 pts/0    00:00:00 ps -ef
apache   21568  8191  0 Apr30 ?        00:00:03 /usr/sbin/httpd
apache   24262  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   24267  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
apache   24268  8191  0 May01 ?        00:00:00 /usr/sbin/httpd
root     29948     1  0 Apr29 ?        00:00:02 syslogd -m 0
root     30027     1  0 Apr29 ?        00:00:01 /usr/sbin/sshd
root     30052     1  0 Apr29 ?        00:00:01 xinetd -stayalive -pidfile /var/
 

xfatihx

0
İyinet Üyesi
Katılım
23 Haziran 2004
Mesajlar
1,076
Reaction score
0
Panel olarak Directadmin kullanıyorum. Directadminde my.cnf dosyası bu şekilde oluyor
Kod:
[mysqld]
local-infile=0
bu durum benim mysql limit hatası alama sebep oldu sonra nette yaptığım araştırma sonucu http://help.directadmin.com/item.php?id=44 şurdaki my.cnf dosyasını kendi serverime yükledim bir sorun kalmadı şuan. ama benim servere uygun mu değilmi bu konuda bilgim yok yardımcı olabilirmisin iyinet?

server özellikleri
İşlemci (CPU) P4 3000 Mhz
Hafıza (RAM) 2048 MB DDR
Disk (HDD) 2x120 GB
Trafik (BW) 4000 GB/Ay

my.cnf dosyam
Kod:
[mysqld]
local-infile=0
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=2
myisam_sort_buffer_size=64M
server-id=1

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout
 

3L3cTRic

0
İyinet Üyesi
Katılım
25 Ocak 2005
Mesajlar
0
Reaction score
0
Mysql sürekli uçuyor

My Top çıktısı

Kod:
top - 02:06:03 up 1 day, 10:00,  1 user,  load average: 1.07, 1.03, 0.83
Tasks: 113 total,   2 running, 111 sleeping,   0 stopped,   0 zombie
Cpu0  : 56.0%us,  2.3%sy,  0.0%ni, 41.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  : 36.5%us,  2.7%sy,  0.0%ni, 59.8%id,  1.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2067584k total,  1949264k used,   118320k free,    42900k buffers
Swap:  4096564k total,       80k used,  4096484k free,  1286800k cached

My.CNF Çıktısı

Kod:
[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

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


mysql in uçmaması için neler yapabilirim yardımcı olursanız sevinirim.
Sunucu Intel Dualcore 2.2 ghz
2gb Ram
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
My Top çıktısı
mysql in uçmaması için neler yapabilirim yardımcı olursanız sevinirim.
Sunucu Intel Dualcore 2.2 ghz
2gb Ram

Kanatlarını bağla diycem ama...

Bir veritabanının uçmasını 2 şekilde anlıyorum,
1. süper hızlı
2. veritabanı kayıp yani silinmiş

senin uçuş hangi türden?
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Panel olarak Directadmin kullanıyorum. Directadminde my.cnf dosyası bu şekilde oluyor
Kod:
[mysqld]
local-infile=0
bu durum benim mysql limit hatası alama sebep oldu sonra nette yaptığım araştırma sonucu http://help.directadmin.com/item.php?id=44 şurdaki my.cnf dosyasını kendi serverime yükledim bir sorun kalmadı şuan. ama benim servere uygun mu değilmi bu konuda bilgim yok yardımcı olabilirmisin iyinet?

server özellikleri
İşlemci (CPU) P4 3000 Mhz
Hafıza (RAM) 2048 MB DDR
Disk (HDD) 2x120 GB
Trafik (BW) 4000 GB/Ay

my.cnf dosyam
Kod:
[mysqld]
local-infile=0
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=2
myisam_sort_buffer_size=64M
server-id=1

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

İçinde bisürü gereksiz şeyler var.
Bu konu başlığında verdiğim tavsiyeleri incelemeni öneririm.
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst