İ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

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
tmmdır girdim, çıktı şu şekilde:

mysql> show status like "%innodb%";
+-----------------------------------+---------+
| Variable_name | Value |
+-----------------------------------+---------+
| Com_show_innodb_status | 0 |
| Innodb_buffer_pool_pages_data | 104 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 23 |
| Innodb_buffer_pool_pages_free | 408 |
| Innodb_buffer_pool_pages_latched | 0 |
| Innodb_buffer_pool_pages_misc | 0 |
| Innodb_buffer_pool_pages_total | 512 |
| Innodb_buffer_pool_read_ahead_rnd | 2 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 3645 |
| Innodb_buffer_pool_reads | 88 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 96 |
| Innodb_data_fsyncs | 44 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 3887104 |
| Innodb_data_reads | 103 |
| Innodb_data_writes | 58 |
| Innodb_data_written | 773120 |
| Innodb_dblwr_pages_written | 23 |
| Innodb_dblwr_writes | 7 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 9 |
| Innodb_log_writes | 20 |
| Innodb_os_log_fsyncs | 29 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 14848 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 0 |
| Innodb_pages_read | 104 |
| Innodb_pages_written | 23 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 1121 |
| Innodb_rows_updated | 19 |
+-----------------------------------+---------+
44 rows in set (0.01 sec)

mysql>
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
tmmdır girdim, çıktı şu şekilde:

Bu iyi oldu, ben ayni komutu calistirinca sadece bu kadar cikti veriyor. Boylece sisteminde innodb olanlarda nasil bir cikti olacagini ogrenmis olduk.


mysql> show status like "%innodb%";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| Com_show_innodb_status | 0 |
+------------------------+-------+
1 row in set (0.00 sec)

mysql>
 

adigec

0
İyinet Üyesi
Katılım
6 Aralık 2007
Mesajlar
8
Reaction score
0
Aynı sorun bende de mevcut bu konuda yardımcı olursanız sevinirim...

Kod:
[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
    
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld]
bind-address=127.0.0.1
set-variable = max_connections=500
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
 

i.ari

0
İyinet Üyesi
Katılım
16 Aralık 2006
Mesajlar
4,437
Reaction score
6
Konum
Ankara
Aynı dertten muzdarip biri olarak bilgileri kopyalıyorum....

my.cnf

Kod:
[mysqld]
connect_timeout=8
interactive_timeout=20
max_connect_errors=5
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_passwords=1
max_allowed_packet=64M
query_cache_size=128M
query_cache_type=1
max_connections=400

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

[mysqld_safe]
err-log=/var/log/mysqld.log


top çıktısı


Kod:
top - 21:21:39 up 5 days,  6:37,  1 user,  load average: 2.47, 2.53, 2.63
Tasks: 150 total,   2 running, 148 sleeping,   0 stopped,   0 zombie
Cpu(s): 45.7% us,  5.1% sy,  0.0% ni, 47.4% id,  1.2% wa,  0.1% hi,  0.4% si
Mem:   4128176k total,  3548116k used,   580060k free,   220076k buffers
Swap:  2000084k total,     3636k used,  1996448k free,  2140180k cached

29061 mysql     15   0  256m  71m 4972 S   98  1.8  13:47.02 mysqld
32474 apache    16   0 41496  23m 4672 S   17  0.6   0:33.40 httpd
 8106 apache    15   0 35276  18m 3640 S   11  0.5   0:01.78 httpd
 1921 apache    15   0 37676  21m 3692 S   10  0.5   0:26.96 httpd
 7410 apache    16   0 42736  26m 4100 S    9  0.7   2:04.47 httpd
11302 apache    15   0 43028  26m 3708 S    9  0.7   1:58.61 httpd
 8131 apache    15   0 35088  18m 3428 S    8  0.5   0:02.65 httpd
 7972 apache    15   0 35272  18m 3560 S    6  0.5   0:01.01 httpd
 3948 apache    15   0 38872  22m 3692 S    5  0.6   0:18.91 httpd
 8128 apache    15   0 35584  19m 3644 S    5  0.5   0:01.58 httpd
 8609 popuser   15   0 30660  24m 2148 S    3  0.6   0:00.10 spamd
22989 apache    15   0 39008  22m 4172 S    3  0.6   1:15.24 httpd
 2386 apache    15   0 45624  29m 4368 S    3  0.7   2:25.96 httpd
 2859 apache    16   0 37920  21m 4220 S    2  0.5   0:23.85 httpd
19623 triplex   15   0 65536  14m 3860 S    2  0.4  51:52.73 sc_serv
18789 popuser   16   0 32056  26m 2228 S    2  0.7   0:06.70 spamd
 8938 apache    15   0 43244  26m 3712 S    2  0.7   1:55.32 httpd
 5409 bira      15   0  6624 5204 1088 S    1  0.1  56:22.24 ircd
27079 apache    16   0 40128  24m 4400 S    1  0.6   0:51.57 httpd
 1676 apache    15   0 38676  22m 3708 S    0  0.5   0:24.86 httpd
 3577 apache    15   0 38112  21m 3708 S    0  0.5   0:19.47 httpd
 4152 root      15   0  2992 1520  420 S    0  0.0   0:00.61 floodkoruma
 4420 apache    15   0 36340  19m 3692 S    0  0.5   0:20.07 httpd
24998 apache    15   0 40180  22m 4728 S    0  0.5   1:04.75 httpd
    1 root      15   0  1700  548  472 S    0  0.0   0:01.22 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.16 migration/0
    3 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.10 migration/1
    6 root      37  19     0    0    0 S    0  0.0   0:00.02 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
    8 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/0
    9 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/1
   10 root      10  -5     0    0    0 S    0  0.0   0:00.22 khelper
   11 root      11  -5     0    0    0 S    0  0.0   0:00.00 kthread
   52 root      10  -5     0    0    0 S    0  0.0   0:00.21 kblockd/0



Sunucu işletim sistemi bilgisi:

Kod:
Linux 2.6.19.1.SM #5 SMP Sun Dec 31 19:30:51 CET 2006 i686 i686 i386 GNU/Linux

sunucumuzda 15 civarında site bi o kadarda vbulletin mevcut...ortalama 10-15 bin civarı izleyen var anlık...


2.4Ghz işlemci ve 4 GB ram kullanıyoruz sunucumuzda...önerilerinizi bekliyorum...şimdiden teşekkürler
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
site artik yavaslamaya basladi. saniyorum my.cnf icin tam optimizasyonu yapma zamani geldi :) loadda bir kasilma yok fakat sayfalar gec geliyor. tuning-primer'in yorumu su sekilde:

[root@brute ~]# ./tuning-primer.sh

-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.22 i686

Uptime = 7 days 1 hrs 8 min 38 sec
Avg. qps = 10
Total Questions = 6159656
Threads Connected = 8

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/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
Current long_query_time = 10 sec.
You have 0 out of 6159668 that take longer than 10 sec. to complete
The slow query log is NOT enabled.
Your long_query_time may be too high, I typically set this under 5 sec.

WORKER THREADS
Current thread_cache_size = 384
Current threads_cached = 28
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 300
Current threads_connected = 8
Historic max_used_connections = 35
The number of used connections is 11% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 465 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 306 M
Configured Max Memory Limit : 1 G
Physical Memory : 1.91 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 23 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 29063
Key buffer fill ratio = 7.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 = 40 M
Current query_cache_used = 3 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 9.51 %
Current query_cache_min_res_unit = 4 K
Query Cache is 26 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current record/read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 39 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 = 65535 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 = 32612 tables
You have a total of 265 tables
You have 299 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 110868 temp tables, 0% 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 = 686 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 62
You may benefit from selective use of InnoDB.
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

[root@brute ~]#
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
site artik yavaslamaya basladi. saniyorum my.cnf icin tam optimizasyonu yapma zamani geldi :) loadda bir kasilma yok fakat sayfalar gec geliyor. tuning-primer'in yorumu su sekilde:

[root@brute ~]# ./tuning-primer.sh

-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.22 i686

Uptime = 7 days 1 hrs 8 min 38 sec
Avg. qps = 10
Total Questions = 6159656
Threads Connected = 8

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/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
Current long_query_time = 10 sec.
You have 0 out of 6159668 that take longer than 10 sec. to complete
The slow query log is NOT enabled.
Your long_query_time may be too high, I typically set this under 5 sec.

WORKER THREADS
Current thread_cache_size = 384
Current threads_cached = 28
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 300
Current threads_connected = 8
Historic max_used_connections = 35
The number of used connections is 11% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 465 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 306 M
Configured Max Memory Limit : 1 G
Physical Memory : 1.91 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 23 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 29063
Key buffer fill ratio = 7.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 = 40 M
Current query_cache_used = 3 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 9.51 %
Current query_cache_min_res_unit = 4 K
Query Cache is 26 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current record/read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 39 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 = 65535 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 = 32612 tables
You have a total of 265 tables
You have 299 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 110868 temp tables, 0% 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 = 686 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 62
You may benefit from selective use of InnoDB.
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

[root@brute ~]#

Sanki server mysql i hiç kullanmıyor gibi.
Kullanıyorsa da index kullanmıyor gibi görünüyor.
Kullandığınız uygulama nedir, indexleri tamammıdır.

Serverdaki sayfa açılımı yavaşlığı sorunu mysql den kaynaklanmıyor olabilir.
Sorunun mysql den kaynaklandığına dair bir ipucu yada belirti varmı.
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Sanki server mysql i hiç kullanmıyor gibi.
Kullanıyorsa da index kullanmıyor gibi görünüyor.
Kullandığınız uygulama nedir, indexleri tamammıdır.

Serverdaki sayfa açılımı yavaşlığı sorunu mysql den kaynaklanmıyor olabilir.
Sorunun mysql den kaynaklandığına dair bir ipucu yada belirti varmı.

atay, Bu innodb kullanan servermıydı?
Innodb için ayar yapmamıştık.
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
evet pleskten dolayi innodb acik. innodb icin my.cnf a bir satir girmistik fakat kaldirmak zorunda kalmistim. su anda innodb ile alakali herhangi bir ayar yok.
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
Sanki server mysql i hiç kullanmıyor gibi.
Kullanıyorsa da index kullanmıyor gibi görünüyor.
Kullandığınız uygulama nedir, indexleri tamammıdır.

Serverdaki sayfa açılımı yavaşlığı sorunu mysql den kaynaklanmıyor olabilir.
Sorunun mysql den kaynaklandığına dair bir ipucu yada belirti varmı.

buyuk ihtimalle mysqlden kaynaklaniyor cunku mysqlin oldugu sayfalarda gec acilma soz konusu. mysqlsiz sayfalarda pek bi kasilma yok.

scripti kendim yazdim arkadaslik scripti. indexlerde sorun yok, indexleride dogru sekilde ayarladim. yani en azindan bildigim sekilde ayarladim :)
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
buyuk ihtimalle mysqlden kaynaklaniyor cunku mysqlin oldugu sayfalarda gec acilma soz konusu. mysqlsiz sayfalarda pek bi kasilma yok.

scripti kendim yazdim arkadaslik scripti. indexlerde sorun yok, indexleride dogru sekilde ayarladim. yani en azindan bildigim sekilde ayarladim :)

Senin db myisam kullaniyor ise ayarlarin tamam, ama index kullanmiyor gibi.
Istersen idexlerin uzerinden bir gecelim nedersin.
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
peki tesekkur ederim, kullandigim indexleri su mantikla kullaniyorum.

ornegin uyeler tablomda id,email,online ve sifre index durumda. buralari index yaptim cunku mysql cekerken WHERE id= email= online= sifre= vb. sekilde sorgular yapiyorum. yani benim index konusunda bildigim where olarak cektigimiz yerleri indexlememizin performans artisi yapacagi dogrultusunda.

tabii yanlis bilmiyorsam :)

Anahtar ismi Tip En önemli Eylem Alan
id UNIQUE 9427 id
email INDEX 9427 email
sifre INDEX 9427 sifre
online INDEX 1 online
ozaman INDEX 9427
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Doğru biliyorsun. Ancak bazen ek indexler yaratmak gerekebiliyor.

Bunu anlamak için my.cnf de şu değişikliği yapıp mysql yeniden başlat.
long_query_time = 3
log-queries-not-using-indexes
log-slow-queries = /var/lib/mysql/slow_queries.log

Bu yavaş sorguları log dosyasına basacaktır. Bu logu inceleyip sorunlu sorguları bulabiliriz.
 

atay

0
İyinet Üyesi
Katılım
29 Ekim 2005
Mesajlar
3,592
Reaction score
37
tesekkurler. yukaridaki satirlari ekledim. artik yarina loglari inceliyip sorunu bulmaya calisicagim.
 

adigec

0
İyinet Üyesi
Katılım
6 Aralık 2007
Mesajlar
8
Reaction score
0
Sayın iyinet
my.cnf ile ilgili çıktıyı gönderdim galiba gözden kaçmış hiç bir yorum alamadım bazen my.cnf yi açıp baktığımda içinde hiç bir bilgi yer almamakda kendiliğinden siliniyor. ve sitem çok ağır çalışmaya başladı. Bu konudaki önerilerinizi beklemekte olup saygılar sunarım...
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Sayın iyinet
my.cnf ile ilgili çıktıyı gönderdim galiba gözden kaçmış hiç bir yorum alamadım bazen my.cnf yi açıp baktığımda içinde hiç bir bilgi yer almamakda kendiliğinden siliniyor. ve sitem çok ağır çalışmaya başladı. Bu konudaki önerilerinizi beklemekte olup saygılar sunarım...

Yok gördüm çıktınızı ancak yorum yapabilemm için sadece my.cnf yeterli değil.
Konu başında gereken çıktılar ile ilgili bilgiler yer almaktadır.
my.cnf kendiliğinden siliniyor ise önce bunun kaynağını bulmanız gerekiyor.
 

adigec

0
İyinet Üyesi
Katılım
6 Aralık 2007
Mesajlar
8
Reaction score
0
Yok gördüm çıktınızı ancak yorum yapabilemm için sadece my.cnf yeterli değil.
Konu başında gereken çıktılar ile ilgili bilgiler yer almaktadır.
my.cnf kendiliğinden siliniyor ise önce bunun kaynağını bulmanız gerekiyor.

Top çıktısı
Kod:
top - 05:49:48 up  7:14,  1 user,  load average: 0.37, 0.42, 0.20
Tasks:  96 total,   2 running,  94 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0% us,  0.3% sy,  0.0% ni, 99.7% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    254752k total,   232184k used,    22568k free,      432k buffers
Swap:  1052248k total,    48904k used,  1003344k free,   115332k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                          
    1 root       16   0  1872   96   68 S  0.0  0.0   0:29.49 init                                                                             
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                      
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                                                      
    4 root       5 -10     0    0    0 S  0.0  0.0   0:00.13 events/0                                                                         
    5 root       7 -10     0    0    0 S  0.0  0.0   0:00.03 khelper                                                                          
    6 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid                                                                           
   17 root       5 -10     0    0    0 S  0.0  0.0   0:00.24 kblockd/0                                                                        
   18 root      25   0     0    0    0 S  0.0  0.0   0:00.00 khubd                                                                            
   37 root      15   0     0    0    0 S  0.0  0.0   4:19.25 kswapd0                                                                          
   38 root      13 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0                                                                            
  184 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                                                                          
  422 root      21   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0                                                                        
  441 root      16   0     0    0    0 S  0.0  0.0   0:14.58 kjournald                                                                        
 1695 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 ata/0                                                                            
 1696 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 ata_aux                                                                          
 1724 root       6 -10  2444    0    0 S  0.0  0.0   0:00.05 udevd                                                                            
 1781 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kauditd                                                                          
 1851 root      24   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                                                                        
 1919 root       0 -20     0    0    0 S  0.0  0.0   0:00.52 loop0                                                                            
 1920 root      15   0     0    0    0 S  0.0  0.0   0:00.07 kjournald                                                                        
 2432 root      16   0  2120  176  132 S  0.0  0.1   0:14.94 syslogd                                                                          
 2436 root      15   0  2252    0    0 S  0.0  0.0   0:00.70 klogd                                                                            
 2461 named     19   0 37292  504  276 S  0.0  0.2   0:20.49 named                                                                            
 2536 root      22   0  2496    0    0 S  0.0  0.0   0:00.00 acpid                                                                            
 2666 root      16   0  5568  284  184 S  0.0  0.1   0:18.42 sshd                                                                             
 2679 root      16   0  2412  388  308 S  0.0  0.2   0:00.57 xinetd                                                                           
 2795 root      25   0  4080    0    0 S  0.0  0.0   0:00.00 couriertcpd                                                                      
 2798 root      24   0  4124    0    0 S  0.0  0.0   0:00.00 courierlogger                                                                    
 2807 root      24   0  4660    0    0 S  0.0  0.0   0:00.00 couriertcpd                                                                      
 2809 root      25   0  5280    0    0 S  0.0  0.0   0:00.00 courierlogger                                                                    
 2817 root      16   0  5004   92   60 S  0.0  0.0   0:00.21 couriertcpd                                                                      
 2819 root      16   0  4536  240  188 S  0.0  0.1   0:00.10 courierlogger

my.cnf kendiliğinden silinmesinide tuning-primer.sh çalıştırmam sebeb olabilirmi ?

Kullandığımız sunucunun özellikleri
İşletim sistemi :Linux
İşlemci : E6850 3.0
Ram : 256 MB
Hdd :40 GB IDE
Bağlantı özellikleri :10 Mbits -100 GB/Ay
Php Sürümü : phpMyAdmin 2.6.3-pl1
MySQL Sürümü : MySQL 4.1.20


Birde şunu sormak istiyorum bu sunucu size sürekli problem yapar diyorsanız...
Başka hosta taşımakda fayda var diyorsanız...
Önere bileceğiniz sağlam ve kaliteli bir hosting firması mevcutmu...
Kullandığım uygulama ise sadece bir tane html web sitesi ve mybb forum scripti var. Bununda veritabanı büyüklüğü 200 mb yakın...
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
63
Konum
Sakarya
Top çıktısı
Kod:
top - 05:49:48 up  7:14,  1 user,  load average: 0.37, 0.42, 0.20
Tasks:  96 total,   2 running,  94 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0% us,  0.3% sy,  0.0% ni, 99.7% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    254752k total,   232184k used,    22568k free,      432k buffers
Swap:  1052248k total,    48904k used,  1003344k free,   115332k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                          
    1 root       16   0  1872   96   68 S  0.0  0.0   0:29.49 init                                                                             
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                      
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                                                      
    4 root       5 -10     0    0    0 S  0.0  0.0   0:00.13 events/0                                                                         
    5 root       7 -10     0    0    0 S  0.0  0.0   0:00.03 khelper                                                                          
    6 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid                                                                           
   17 root       5 -10     0    0    0 S  0.0  0.0   0:00.24 kblockd/0                                                                        
   18 root      25   0     0    0    0 S  0.0  0.0   0:00.00 khubd                                                                            
   37 root      15   0     0    0    0 S  0.0  0.0   4:19.25 kswapd0                                                                          
   38 root      13 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0                                                                            
  184 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                                                                          
  422 root      21   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0                                                                        
  441 root      16   0     0    0    0 S  0.0  0.0   0:14.58 kjournald                                                                        
 1695 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 ata/0                                                                            
 1696 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 ata_aux                                                                          
 1724 root       6 -10  2444    0    0 S  0.0  0.0   0:00.05 udevd                                                                            
 1781 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kauditd                                                                          
 1851 root      24   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                                                                        
 1919 root       0 -20     0    0    0 S  0.0  0.0   0:00.52 loop0                                                                            
 1920 root      15   0     0    0    0 S  0.0  0.0   0:00.07 kjournald                                                                        
 2432 root      16   0  2120  176  132 S  0.0  0.1   0:14.94 syslogd                                                                          
 2436 root      15   0  2252    0    0 S  0.0  0.0   0:00.70 klogd                                                                            
 2461 named     19   0 37292  504  276 S  0.0  0.2   0:20.49 named                                                                            
 2536 root      22   0  2496    0    0 S  0.0  0.0   0:00.00 acpid                                                                            
 2666 root      16   0  5568  284  184 S  0.0  0.1   0:18.42 sshd                                                                             
 2679 root      16   0  2412  388  308 S  0.0  0.2   0:00.57 xinetd                                                                           
 2795 root      25   0  4080    0    0 S  0.0  0.0   0:00.00 couriertcpd                                                                      
 2798 root      24   0  4124    0    0 S  0.0  0.0   0:00.00 courierlogger                                                                    
 2807 root      24   0  4660    0    0 S  0.0  0.0   0:00.00 couriertcpd                                                                      
 2809 root      25   0  5280    0    0 S  0.0  0.0   0:00.00 courierlogger                                                                    
 2817 root      16   0  5004   92   60 S  0.0  0.0   0:00.21 couriertcpd                                                                      
 2819 root      16   0  4536  240  188 S  0.0  0.1   0:00.10 courierlogger
my.cnf kendiliğinden silinmesinide tuning-primer.sh çalıştırmam sebeb olabilirmi ?

Kullandığımız sunucunun özellikleri
İşletim sistemi :Linux
İşlemci : E6850 3.0
Ram : 256 MB
Hdd :40 GB IDE
Bağlantı özellikleri :10 Mbits -100 GB/Ay
Php Sürümü : phpMyAdmin 2.6.3-pl1
MySQL Sürümü : MySQL 4.1.20


Birde şunu sormak istiyorum bu sunucu size sürekli problem yapar diyorsanız...
Başka hosta taşımakda fayda var diyorsanız...
Önere bileceğiniz sağlam ve kaliteli bir hosting firması mevcutmu...
Kullandığım uygulama ise sadece bir tane html web sitesi ve mybb forum scripti var. Bununda veritabanı büyüklüğü 200 mb yakın...

Hayır tuning-primer.sh my.cnf silmez.

Makinada çok az bellek var, verdiğim ayarlar sorun yaratabilir bu nedenle 2 gün sonra tuning-primer.sh çalıştırıp sonucu buraya ekle bir bakalım.

[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

skip-locking
skip-innodb
skip-name-resolve
key_buffer = 64M
max_connections = 300
table_cache = 5000
thread_cache_size = 384
low_priority_updates = 1
query_cache_size = 16M
query_cache_type = 1
query_cache_limit = 4M

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

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

adigec

0
İyinet Üyesi
Katılım
6 Aralık 2007
Mesajlar
8
Reaction score
0
Teşekkür ederim verdiklerinizi ekledim iki gün sonra tuning-primer.sh kayıtlarını eklerim...
 

shape

0
İyinet Üyesi
Katılım
18 Şubat 2006
Mesajlar
236
Reaction score
0
Merhaba,

top:
top - 08:28:13 up 7 days, 9:06, 1 user, load average: 4.86, 3.41, 3.05
Tasks: 47 total, 4 running, 42 sleeping, 0 stopped, 1 zombie
Cpu(s): 69.8% us, 7.2% sy, 0.0% ni, 21.5% id, 1.4% wa, 0.0% hi, 0.0% si
Mem: 524288k total, 453572k used, 70716k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23849 mysql 15 0 165m 49m 5732 S 83 9.7 499:35.01 mysqld
3165 apache 25 0 20236 4392 1392 R 49 0.8 9099:47 perl
29792 apache 16 0 185m 47m 4608 S 37 9.2 0:16.41 httpd
28564 apache 16 0 185m 47m 4564 S 36 9.3 0:16.76 httpd
30178 apache 16 0 182m 44m 3884 S 32 8.7 0:12.13 httpd
28066 apache 16 0 189m 51m 4608 S 31 10.1 0:27.56 httpd
30534 apache 16 0 179m 41m 3844 R 28 8.1 0:01.94 httpd
28492 apache 16 0 184m 46m 4608 S 7 9.1 0:25.66 httpd
30543 apache 15 0 184m 46m 3840 S 0 9.2 0:01.67 httpd
1 root 16 0 4752 612 516 S 0 0.1 0:02.61 init
20328 root 16 0 21928 1268 856 S 0 0.2 0:26.44 sshd
20341 root 16 0 8716 872 692 S 0 0.2 0:00.64 xinetd
20408 root 16 0 9700 916 512 S 0 0.2 0:08.33 crond
20417 root 18 0 20948 900 580 S 0 0.2 0:00.00 saslauthd
20418 root 18 0 20948 568 248 S 0 0.1 0:00.00 saslauthd
16096 root 15 0 3632 552 440 S 0 0.1 0:09.56 syslogd
17566 root 15 0 18204 1044 724 S 0 0.2 0:00.00 couriertcpd

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


Bilgiler böyle, perl ve mysql cpuyu kastıyor, perl hakkında tam olarak bilgim yok nedeni nedir bu kadar cpu yemesinin?
Ve ne gibi ayarlar yapmam gerekli bilgilendirirseniz sevinirim.
 

iyinet

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

top:


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
Bilgiler böyle, perl ve mysql cpuyu kastıyor, perl hakkında tam olarak bilgim yok nedeni nedir bu kadar cpu yemesinin?
Ve ne gibi ayarlar yapmam gerekli bilgilendirirseniz sevinirim.

Ayarlardan Innodb kullandiginiz anlasiliyor, innodb yaninda myisam da kullaniyormusunuz?
Innodb ve MyIsam kullanim oraniniz nedir, yada en cok innodb mi yoksa myisam mi kullaniyorsunuz?
 

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