İyinet'e Hoşgeldiniz!

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

Kayıt Ol!

tuning-primer.sh mysql tuning scripti - mysql performans raporu

aLcadraz

0
İyinet Üyesi
Katılım
24 Mart 2005
Mesajlar
106
Reaction score
0
top - 12:51:13 up 1 day, 19:16, 1 user, load average: 10.51, 6.98, 3.56
Tasks: 206 total, 2 running, 203 sleeping, 1 stopped, 0 zombie
Cpu(s): 15.0% us, 1.2% sy, 0.0% ni, 69.2% id, 14.5% wa, 0.0% hi, 0.1% si
Mem: 3116652k total, 2959176k used, 157476k free, 6980k buffers
Swap: 2000968k total, 1633864k used, 367104k free, 425764k cached

PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
936 webarsiv 39 19 0 0:27.06 45.8 2168m 1.4g 576 T analog
4538 mysql 20 0 11 209:13.40 4.6 286m 140m 2872 S mysqld
2285 nobody 20 0 6 6:10.98 0.7 34336 21m 2652 S httpd
2288 nobody 20 0 0 5:16.66 0.7 33724 20m 2556 S httpd
2290 nobody 20 0 0 5:53.34 0.7 33716 20m 2624 S httpd
2292 nobody 20 0 9 5:47.69 0.7 33388 20m 2612 S httpd
24411 nobody 20 0 0 1:50.68 0.7 33264 20m 2544 S httpd
2286 nobody 20 0 0 6:14.32 0.7 33648 20m 2552 S httpd
2296 nobody 20 0 0 6:36.20 0.7 33192 20m 2612 S httpd
2291 nobody 20 0 0 6:22.12 0.7 33920 19m 2544 S httpd
2293 nobody 20 0 5 6:03.98 0.7 33256 19m 2520 S httpd
2297 nobody 20 0 0 5:33.90 0.6 32472 19m 2656 S httpd
29956 nobody 20 0 0 0:42.02 0.6 32512 19m 2508 S httpd
29047 nobody 20 0 0 0:51.83 0.6 31852 18m 2644 S httpd
27075 nobody 20 0 0 1:06.98 0.6 31728 18m 2524 S httpd
29048 nobody 20 0 2 0:46.48 0.6 31328 18m 2584 S httpd
29107 nobody 20 0 5 0:47.11 0.6 30100 17m 2576 S httpd
26307 nobody 20 0 0 1:04.92 0.6 30184 17m 2568 S httpd
3810 root 20 0 0 0:06.79 0.6 27788 17m 1288 S spamd
29998 nobody 20 0 12 0:34.24 0.5 29364 16m 2612 S httpd
30601 nobody 20 0 1 0:27.08 0.5 28920 15m 2456 S httpd
29955 nobody 20 0 0 0:31.43 0.5 27940 15m 2492 S httpd
29999 nobody 20 0 0 0:28.36 0.5 27652 14m 2484 S httpd
30600 nobody 20 0 0 0:23.50 0.5 27360 14m 2492 S httpd
31592 nobody 20 0 0 0:12.66 0.5 27664 14m 2440 S httpd
29954 nobody 20 0 0 0:37.40 0.5 27400 14m 2512 S httpd
32410 nobody 20 0 0 0:13.71 0.5 27232 14m 2532 S httpd
31591 nobody 20 0 0 0:17.23 0.5 27492 14m 2324 S httpd
31260 nobody 20 0 0 0:18.10 0.5 26812 14m 2548 S httpd
991 nobody 20 0 0 0:01.69 0.5 26760 14m 2504 S httpd
30602 nobody 20 0 0 0:22.58 0.4 26184 13m 2528 S httpd


şuan aşırı ram ve swap kullanıyor :S
 

MysteriousTR

0
İyinet Üyesi
Katılım
3 Şubat 2008
Mesajlar
24
Reaction score
0
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 4.1.22-standard i686

./tuning-primer.sh: line 388: bc: command not found
./tuning-primer.sh: line 389: bc: command not found
./tuning-primer.sh: line 390: bc: command not found
./tuning-primer.sh: line 391: bc: command not found
./tuning-primer.sh: line 392: bc: command not found
./tuning-primer.sh: line 393: bc: command not found
Uptime = days hrs min sec
Avg. qps = 5
Total Questions = 1707329
Threads Connected = 1

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/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 99 out of 1707343 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 = 85
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 1
Historic max_used_connections = 86
The number of used connections is 17% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
./tuning-primer.sh: line 1204: bc: command not found
./tuning-primer.sh: line 1205: bc: command not found
./tuning-primer.sh: line 1229: bc: command not found
./tuning-primer.sh: line 1232: bc: command not found
./tuning-primer.sh: line 1233: bc: command not found
./tuning-primer.sh: line 1235: bc: command not found
./tuning-primer.sh: line 1237: [: -gt: unary operator expected
./tuning-primer.sh: line 350: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 356: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 362: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=max_memoryHR': not a valid identifier
Max Memory Ever Allocated : bytes
./tuning-primer.sh: line 350: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 356: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 362: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers : bytes
./tuning-primer.sh: line 350: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 356: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 362: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=global_buffersHR': not a valid identifier
Configured Max Global Buffers : bytes
./tuning-primer.sh: line 350: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 356: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 362: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=total_memoryHR': not a valid identifier
Configured Max Memory Limit : bytes
./tuning-primer.sh: line 331: bc: command not found
Physical Memory : G
Max memory limit seem to be within acceptable norms

KEY BUFFER
./tuning-primer.sh: line 331: bc: command not found
./tuning-primer.sh: line 646: bc: command not found
./tuning-primer.sh: line 647: bc: command not found
./tuning-primer.sh: line 331: bc: command not found
Current MyISAM index space = M
./tuning-primer.sh: line 331: bc: command not found
Current key_buffer_size = M
Key cache miss rate is 1 : 521
Key buffer fill ratio = %
./tuning-primer.sh: line 684: [: -ge: unary operator expected
./tuning-primer.sh: line 688: [: -le: unary operator expected
Your key_buffer_size seems to be fine

QUERY CACHE
./tuning-primer.sh: line 719: bc: command not found
./tuning-primer.sh: line 720: bc: command not found
Query cache is enabled
./tuning-primer.sh: line 331: bc: command not found
Current query_cache_size = M
./tuning-primer.sh: line 331: bc: command not found
Current query_cache_used = M
./tuning-primer.sh: line 331: bc: command not found
Current query_cache_limit = M
Current Query cache Memory fill ratio = %
./tuning-primer.sh: line 331: bc: command not found
Current query_cache_min_res_unit = K
./tuning-primer.sh: line 733: bc: command not found
./tuning-primer.sh: line 734: bc: command not found
./tuning-primer.sh: line 735: [: -gt: unary operator expected
./tuning-primer.sh: line 742: [: -le: unary operator expected
./tuning-primer.sh: line 746: [: -ge: unary operator expected
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
./tuning-primer.sh: line 331: bc: command not found
Current sort_buffer_size = M
./tuning-primer.sh: line 331: bc: command not found
Current read_rnd_buffer_size = K
Sort buffer seems to be fine

JOINS
./tuning-primer.sh: line 331: bc: command not found
Current join_buffer_size = M
You have had 31 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 = 2558 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 = 1024 tables
You have a total of 1650 tables
You have 1022 open tables.
Current table_cache hit rate is 11%, while 99% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
./tuning-primer.sh: line 331: bc: command not found
Current max_heap_table_size = M
./tuning-primer.sh: line 331: bc: command not found
Current tmp_table_size = M
Of 91866 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
./tuning-primer.sh: line 331: bc: command not found
Current read_buffer_size = M
Current table scan ratio = 2109 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 979
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'



Böyle bir çıktı aldım nasıl bir yol izlemem lazım yardımcı olursan sevinirim iyinet.
 

Remark

0
İyinet Üyesi
Katılım
24 Mayıs 2007
Mesajlar
395
Reaction score
0
Merhabalar bende şöyle bir sonuç çıktı.

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

ls: invalid option -- H
Try `ls --help' for more information.
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.54 i686

./tuning-primer.sh: line 388: bc: command not found
./tuning-primer.sh: line 389: bc: command not found
./tuning-primer.sh: line 390: bc: command not found
./tuning-primer.sh: line 391: bc: command not found
./tuning-primer.sh: line 392: bc: command not found
./tuning-primer.sh: line 393: bc: command not found
Uptime = days hrs min sec
Avg. qps = 5
Total Questions = 760
Threads Connected = 1

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/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

ls: invalid option -- H
Try `ls --help' for more information.
SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 0 out of 781 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/5.0/en/point-in-time-recovery.html

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

MAX CONNECTIONS
Current max_connections = 100
Current threads_connected = 1
Historic max_used_connections = 1
The number of used connections is 1% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating

ls: invalid option -- H
Try `ls --help' for more information.
MEMORY USAGE
./tuning-primer.sh: line 1204: bc: command not found
./tuning-primer.sh: line 1205: bc: command not found
./tuning-primer.sh: line 1229: bc: command not found
./tuning-primer.sh: line 1232: bc: command not found
./tuning-primer.sh: line 1233: bc: command not found
./tuning-primer.sh: line 1235: bc: command not found
./tuning-primer.sh: line 1237: [: -gt: unary operator expected
./tuning-primer.sh: line 350: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 356: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 362: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=max_memoryHR': not a valid identifier
Max Memory Ever Allocated : bytes
./tuning-primer.sh: line 350: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 356: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 362: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers : bytes
./tuning-primer.sh: line 350: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 356: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 362: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=global_buffersHR': not a valid identifier
Configured Max Global Buffers : bytes
./tuning-primer.sh: line 350: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 356: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 362: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 369: export: `0=total_memoryHR': not a valid identifier
Configured Max Memory Limit : bytes
./tuning-primer.sh: line 331: bc: command not found
Physical Memory : G
Max memory limit seem to be within acceptable norms

KEY BUFFER
./tuning-primer.sh: line 331: bc: command not found
./tuning-primer.sh: line 646: bc: command not found
./tuning-primer.sh: line 647: bc: command not found
./tuning-primer.sh: line 331: bc: command not found
Current MyISAM index space = M
./tuning-primer.sh: line 331: bc: command not found
Current key_buffer_size = M
Key cache miss rate is 1 : 18
Key buffer fill ratio = %
./tuning-primer.sh: line 680: [: -ge: unary operator expected
./tuning-primer.sh: line 684: [: -ge: unary operator expected
./tuning-primer.sh: line 688: [: -le: unary operator expected
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
./tuning-primer.sh: line 331: bc: command not found
Current sort_buffer_size = M
./tuning-primer.sh: line 331: bc: command not found
Current read_rnd_buffer_size = K
Sort buffer seems to be fine

JOINS
./tuning-primer.sh: line 331: bc: command not found
Current join_buffer_size = K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

ls: invalid option -- H
Try `ls --help' for more information.
OPEN FILES LIMIT
Current open_files_limit = 1024 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 = 64 tables
You have a total of 528 tables
You have 64 open tables.
Current table_cache hit rate is 10%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
./tuning-primer.sh: line 331: bc: command not found
Current max_heap_table_size = M
./tuning-primer.sh: line 331: bc: command not found
Current tmp_table_size = M
Of 116 temp tables, 10% 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
./tuning-primer.sh: line 331: bc: command not found
Current read_buffer_size = K
Current table scan ratio = 637 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 958
Your table locking seems to be fine

[root@unix ~]#
 

Senol

0
İyinet Üyesi
Onaylı Üye
Katılım
25 Haziran 2005
Mesajlar
4,856
Reaction score
1
Konum
Bursa
merhabalar mysql i optimizasyon konusunda biraz zayıfım. my.cnf dosyam aşağıda ne gibi bir değişiklikler yapmalıyım ?

CPU Bilgileri:

PHP:
model name      : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping        : 9
cpu MHz         : 3200.047
cache size      : 1024 KB

my.cnf dosyasının içeriği:

PHP:
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
safe-show-database
skip-innodb
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
log-slow-queries=/var/log/mysql-slow.log
bind-address            = 127.0.0.1

key_buffer              = 256M
join_buffer_size        = 2M
table_cache             = 1024
max_allowed_packet      = 16M
sort_buffer_size        = 2M
read_buffer_size        = 2M
read_rnd_buffer_siz     = 4M
tmp_table_size          = 128M
thread_stack            = 128K
max_heap_table_size     = 64M
max_allowed_packet      = 64M
bulk_insert_buffer_size = 8M
thread_cache_size       = 384
max_connections         = 200
table_cache             = 1024
#thread_concurrency     = 10
query_cache_limit       = 4M
query_cache_size        = 40M
query_cache_type        = 1
default-storage-engine  = MyISAM
#log            = /var/log/mysql/mysql.log
log_slow_queries        = /var/log/mysql/mysql-slow.log
long_query_time = 2
#log-queries-not-using-indexes
log_bin                 = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
skip-bdb


[mysqldump]
quick
quote-names
max_allowed_packet      = 32M

Top M çıktısı:

PHP:
top - 00:19:53 up 19 days,  6:32,  1 user,  load average: 4.37, 3.55, 3.14
Tasks: 141 total,   3 running, 138 sleeping,   0 stopped,   0 zombie
Cpu(s): 62.6%us, 31.9%sy,  0.0%ni,  4.0%id,  0.3%wa,  0.3%hi,  0.8%si,  0.0%st
Mem:   2068160k total,  1924136k used,   144024k free,    90812k buffers
Swap:  2096472k total,       24k used,  2096448k free,  1399892k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20401 mysql     15   0  387m 225m 4800 S  185 11.2   2833:39 mysqld
 3208 root      15   0 31772  28m 2540 S    0  1.4   0:23.60 spamd
 3490 root      15   0 31772  26m  632 S    0  1.3   0:00.18 spamd
 3491 root      18   0 31772  26m  540 S    0  1.3   0:00.22 spamd
20315 root      18   0 32184  10m 6164 R    0  0.5   0:34.21 apache2
 2025 www-data  18   0 33016  10m 5308 S    0  0.5   0:03.93 apache2
 2120 www-data  15   0 33264  10m 5312 S    0  0.5   0:02.72 apache2
 2296 www-data  16   0 32940  10m 5028 S    1  0.5   0:01.94 apache2
 2056 www-data  15   0 32952  10m 5144 S    0  0.5   0:02.55 apache2
 2241 www-data  15   0 32952  10m 5108 S    0  0.5   0:01.84 apache2
 2131 www-data  15   0 32924   9m 5156 S    0  0.5   0:01.35 apache2
 2188 www-data  15   0 32896   9m 5164 S    0  0.5   0:00.79 apache2
 1906 www-data  17   0 33372 9.8m 4796 S    0  0.5   0:06.36 apache2
 2096 www-data  15   0 33280 9948 4780 S    0  0.5   0:01.71 apache2
 2114 www-data  16   0 32920 9752 4568 S    0  0.5   0:03.89 apache2
 2326 www-data  15   0 32936 9736 4612 S    0  0.5   0:02.29 apache2
 2133 www-data  15   0 32696 9720 4568 S    0  0.5   0:02.04 apache2
 1994 www-data  15   0 32692 9676 4588 S    0  0.5   0:01.77 apache2
 2338 www-data  15   0 32892 9652 4600 S    0  0.5   0:00.93 apache2
 2320 www-data  16   0 32700 9632 4516 S    0  0.5   0:00.46 apache2

tuning primer çıktısı:

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

MySQL Version 5.0.32-Debian_7etch5-log i486

Uptime = 2 days 5 hrs 35 min 41 sec
Avg. qps = 30
Total Questions = 5949923
Threads Connected = 2

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 = 2 sec.
You have 40630 out of 5949948 that take longer than 2 sec. to complete
The slow query log is enabled.
Your long_query_time seems to be fine

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

MAX CONNECTIONS
Current max_connections = 200
Current threads_connected = 3
Historic max_used_connections = 136
The number of used connections is 68% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 1 G
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 306 M
Configured Max Memory Limit : 2 G
Physical Memory : 1.97 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 306 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 4036
Key buffer fill ratio = 44.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 = 24 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 60.97 %
Current query_cache_min_res_unit = 4 K
Query Cache is 21 % 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.
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 = 3 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 28 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 = 2258 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
You currently have open more than 75% of your open_files_limit
You should set a higher value for open_files_limit in my.cnf

TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 772 tables
You have 1024 open tables.
Current table_cache hit rate is 53%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 64 M
Current tmp_table_size = 128 M
Of 91458 temp tables, 31% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 389 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 15
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

onerileriniz icin şimdiden teşekkurler
 

Pehepe

0
İyinet Üyesi
Katılım
20 Şubat 2008
Mesajlar
22
Reaction score
0
Prd ben iki gun sonra yazıcam degerleri gerci destek bitmiş gibi gozukuyor ama olsun şansımı denicem belki cevab veren olur
 

Pehepe

0
İyinet Üyesi
Katılım
20 Şubat 2008
Mesajlar
22
Reaction score
0
Server Information :

Kod:
Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
Processor #1 speed: 300.000 MHz
Processor #1 cache size: 4096 KB

Processor #2 Vendor: GenuineIntel
Processor #2 Name: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
Processor #2 speed: 300.000 MHz
Processor #2 cache size: 4096 KB

Processor #3 Vendor: GenuineIntel
Processor #3 Name: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
Processor #3 speed: 300.000 MHz
Processor #3 cache size: 4096 KB

Processor #4 Vendor: GenuineIntel
Processor #4 Name: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
Processor #4 speed: 300.000 MHz
Processor #4 cache size: 4096 KB


Top Çıktısı :

Kod:
top - 05:32:26 up 2 days, 15:04,  1 user,  load average: 2.45, 1.75, 1.08
Tasks:  73 total,   1 running,  71 sleeping,   0 stopped,   1 zombie
Cpu(s):  1.7% us,  0.9% sy,  0.0% ni, 70.6% id, 26.8% wa,  0.0% hi,  0.0% si
Mem:   2097152k total,   765568k used,  1331584k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
 1911 root      18   0    2   0:00.14  1.1 83928  22m 9536 D cpsrvd-ssl
 1992 mailnull  18   0    2   0:00.06  0.3 31832 5512 3440 S exim
    1 root      18   0    0   0:04.38  0.0  4824  616  512 S init
 1603 root      15   0    0   0:00.05  0.1  6220 1156  868 R top
 2013 mailnull  18   0    0   0:00.00  0.1 29096 2580 2024 D exim
11667 root      18   0    0   0:00.00  0.1  6476 1212  996 S mysqld_safe
11721 mysql     16   0    0 226:32.55 18.4  757m 375m 4908 S mysqld
16139 root      15   0    0   0:07.67  1.9 71416  39m 1576 S spamd
18305 root      18   0    0   0:00.07  0.3 34124 6592 3116 S authProg
18329 root      18   0    0   0:00.04  0.3 34124 6596 3116 S authProg
18338 root      18   0    0   0:00.05  0.3 34124 6600 3116 S authProg
19693 root      15   0    0   0:02.65  0.0  3704  564  448 S syslogd
19718 root      18   0    0   0:00.00  0.0  2608  392  312 S courierlogger
19722 root      18   0    0   0:00.04  0.0  9076  652  524 S authdaemond
19723 root      15   0    0   0:00.04  0.0  9076  380  240 S authdaemond
19724 root      15   0    0   0:00.05  0.0  9076  380  240 S authdaemond
19725 root      15   0    0   0:00.03  0.0  9076  380  240 S authdaemond
19726 root      15   0    0   0:00.03  0.0  9076  380  240 S authdaemond
19727 root      15   0    0   0:00.03  0.0  9076  380  240 S authdaemond
19814 nobody    18   0    0   0:01.63  0.1 19408 1360  620 S proftpd
19855 root      17   0    0   0:00.06  0.3 34120 6592 3116 S authProg
20179 root      17   0    0   0:00.02  0.3 34124 6596 3116 S authProg
21752 root      15   0    0   0:03.49  0.1 22000 1284  864 S sshd
21810 root      15   0    0   0:00.00  0.0  8792  820  648 S xinetd
22026 root      18   0    0   0:06.74  0.3 24072 6392 1336 S chkservd
22047 root      18   0    0   0:00.05  0.0  2604  392  312 S courierlogger
22048 root      15   0    0   0:00.11  0.0  4760  540  448 S couriertcpd
22055 root      18   0    0   0:00.00  0.0  2604  308  240 S courierlogger
22056 root      25   0    0   0:00.00  0.0  4760  528  432 S couriertcpd
22061 root      16   0    0   0:00.09  0.0  2608  392  312 S courierlogger
22062 root      15   0    0   0:00.09  0.0  4760  544  448 S couriertcpd
22067 root      18   0    0   0:00.00  0.0  2604  308  240 S courierlogger
22068 root      25   0    0   0:00.00  0.0  4756  524  432 S couriertcpd
22110 root      15   0    0   0:22.82  1.9 70920  39m 2124 S spamd
22145 root      15   0    0   0:00.38  1.9 71320  39m 1572 S spamd
23644 root      15   0    0   0:00.08  0.1 36232 2644 2064 S sshd
23675 root      18   0    0   0:00.08  0.1  7748 1600 1236 S bash

nano /etc/my.cnf Çıktısı :

Kod:
[mysqld]
skip-bdb
skip-locking
skip-name-resolve
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
table_cache = 400
low_priority_updates = 1
max_connections = 500
thread_cache_size = 128
key_buffer = 500M
query-cache-type = 1
query-cache-size = 64M
query_cache_limit = 4M
max_allowed_packet=64M
safe-show-database
set-variable=local-infile=0
max_allowed_packet = 32M
[mysql.server]
user=mysql
old-passwords = 1

./tuning-primer.sh Çıktısı :

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

MySQL Version 5.0.45-community x86_64

./tuning-primer.sh: line 389: bc: command not found
./tuning-primer.sh: line 390: bc: command not found
./tuning-primer.sh: line 391: bc: command not found
./tuning-primer.sh: line 392: bc: command not found
./tuning-primer.sh: line 393: bc: command not found
./tuning-primer.sh: line 394: bc: command not found
Uptime =  days  hrs  min  sec
Avg. qps = 18
Total Questions = 3304583
Threads Connected = 2

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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 394 out of 3304604 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/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 99
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 2
Historic max_used_connections = 101
The number of used connections is 20% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
./tuning-primer.sh: line 1205: bc: command not found
./tuning-primer.sh: line 1206: bc: command not found
./tuning-primer.sh: line 1230: bc: command not found
./tuning-primer.sh: line 1233: bc: command not found
./tuning-primer.sh: line 1234: bc: command not found
./tuning-primer.sh: line 1236: bc: command not found
./tuning-primer.sh: line 1238: [: -gt: unary operator expected
./tuning-primer.sh: line 351: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 357: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 363: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 370: export: `0=max_memoryHR': not a valid identifier
Max Memory Ever Allocated :  bytes
./tuning-primer.sh: line 351: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 357: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 363: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 370: export: `0=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers :  bytes
./tuning-primer.sh: line 351: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 357: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 363: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 370: export: `0=global_buffersHR': not a valid identifier
Configured Max Global Buffers :  bytes
./tuning-primer.sh: line 351: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 357: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 363: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 370: export: `0=total_memoryHR': not a valid identifier
Configured Max Memory Limit :  bytes
./tuning-primer.sh: line 332: bc: command not found
Physical Memory :  G
Max memory limit seem to be within acceptable norms

KEY BUFFER
./tuning-primer.sh: line 332: bc: command not found
./tuning-primer.sh: line 647: bc: command not found
./tuning-primer.sh: line 648: bc: command not found
./tuning-primer.sh: line 332: bc: command not found
Current MyISAM index space =  M
./tuning-primer.sh: line 332: bc: command not found
Current key_buffer_size =  M
Key cache miss rate is 1 : 7743
Key buffer fill ratio =  %
./tuning-primer.sh: line 685: [: -ge: unary operator expected
./tuning-primer.sh: line 689: [: -le: unary operator expected
Your key_buffer_size seems to be fine

QUERY CACHE
./tuning-primer.sh: line 720: bc: command not found
./tuning-primer.sh: line 721: bc: command not found
Query cache is enabled
./tuning-primer.sh: line 332: bc: command not found
Current query_cache_size =  M
./tuning-primer.sh: line 332: bc: command not found
Current query_cache_used =  M
./tuning-primer.sh: line 332: bc: command not found
Current query_cache_limit =  M
Current Query cache Memory fill ratio =  %
./tuning-primer.sh: line 332: bc: command not found
Current query_cache_min_res_unit =  K
./tuning-primer.sh: line 734: bc: command not found
./tuning-primer.sh: line 735: bc: command not found
./tuning-primer.sh: line 736: [: -gt: unary operator expected
./tuning-primer.sh: line 743: [: -le: unary operator expected
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
./tuning-primer.sh: line 332: bc: command not found
Current sort_buffer_size =  M
./tuning-primer.sh: line 332: bc: command not found
Current read_rnd_buffer_size =  K
Sort buffer seems to be fine

JOINS
./tuning-primer.sh: line 332: bc: command not found
Current join_buffer_size =  K
You have had 13 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 = 2500 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 = 400 tables
You have a total of 171 tables
You have 400 open tables.
Current table_cache hit rate is 47%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
./tuning-primer.sh: line 332: bc: command not found
Current max_heap_table_size =  M
./tuning-primer.sh: line 332: bc: command not found
Current tmp_table_size =  M
Of 25225 temp tables, 3% 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
./tuning-primer.sh: line 332: bc: command not found
Current read_buffer_size =  K
Current table scan ratio = 3999 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 175
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'.
 

sali

0
İyinet Üyesi
Katılım
26 Mayıs 2008
Mesajlar
6
Reaction score
0
selam arkadaşlar, bende tuning raporu rica edebilirmiyim, teşekkür ederim..

Sunucu sistemi:
AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
2gb ram linux, centos
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.22 i686

Uptime = 2 days 0 hrs 49 min 8 sec
Avg. qps = 106
Total Questions = 18726241
Threads Connected = 6

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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 0 out of 18726285 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/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 22
Historic threads_per_sec = 13
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size

MAX CONNECTIONS
Current max_connections = 100
Current threads_connected = 3
Historic max_used_connections = 41
The number of used connections is 41% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 128 M
Configured Max Per-thread Buffers : 268 M
Configured Max Global Buffers : 17 M
Configured Max Memory Limit : 286 M
Physical Memory : 1.85 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 6 M
Current key_buffer_size = 7 M
Key cache miss rate is 1 : 12936
Key buffer fill ratio = 12.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_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 213 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 = 1024 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 = 64 tables
You have a total of 471 tables
You have 64 open tables.
Current table_cache hit rate is 0%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 93291 temp tables, 87% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 200 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 1350
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
62
Konum
Sakarya
Son 1 sayfayi okuyup mesaj postalayan arkadaslara tavsiyem, tum konuyu basindan itibaren okuyunuz.
 

saka

0
İyinet Üyesi
Katılım
25 Ekim 2007
Mesajlar
286
Reaction score
1
Konum
istanbul
Konuyu başından beri okudum.
cpanel kullanıyorum. my.cnf nin nasıl ve nereden düzenleceğini bilmiyorum.

sunucum: 1.8 ghz intel 2160 işlemci ve 2gb ram içeriyor.

raporum ise şu şekilde;
Kod:
        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.45-community-log i686

Uptime = 3 days 1 hrs 10 min 30 sec
Avg. qps = 93
Total Questions = 24598021
Threads Connected = 4

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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 7099 out of 24598161 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 enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_logs_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html

WORKER THREADS
Current thread_cache_size = 32
Current threads_cached = 29
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 1000
Current threads_connected = 6
Historic max_used_connections = 260
The number of used connections is 26% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 13 G
Configured Max Per-thread Buffers : 47 G
Configured Max Global Buffers : 888 M
Configured Max Memory Limit : 48 G
Physical Memory : 1.96 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 75 M
Current key_buffer_size = 750 M
Key cache miss rate is 1 : 3002
Key buffer fill ratio = 8.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 = 128 M
Current query_cache_used = 32 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 25.44 %
Current query_cache_min_res_unit = 4 K
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 = 8 M
Current read_rnd_buffer_size = 31 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 709 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 = 32262 tables
You have a total of 232 tables
You have 1285 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 128 M
Of 92875 temp tables, 23% 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 = 7 M
Current table scan ratio = 623 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 1
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
 

kostak

0
Yasakli Uye
Katılım
23 Nisan 2007
Mesajlar
409
Reaction score
1
Konum
Gemlik
İyinet zahmet olmazsa banada yardımcı olabilirmisin ?.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
4 gb. ram

My conf.
[mysqld]
max_connections = 500
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_passwords=1
skip-innodb
skip-locking
key_buffer = 384M
table_cache = 1500
query_cache_size = 32M
query_cache_type = 1

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

MySQL Version 5.0.67-community i686

Uptime = 3 days 15 hrs 34 min 24 sec
Avg. qps = 64
Total Questions = 20449640
Threads Connected = 3

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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 972 out of 20449661 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/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 7
Historic threads_per_sec = 7
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size

MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 3
Historic max_used_connections = 322
The number of used connections is 64% of the configured maximum.
Your max_connections variable seems to be fine.

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

KEY BUFFER
Current MyISAM index space = 228 M
Current key_buffer_size = 384 M
Key cache miss rate is 1 : 9530
Key buffer fill ratio = 19.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 = 20 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 64.81 %
Current query_cache_min_res_unit = 4 K
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 90 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 = 3510 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
You currently have open more than 75% of your open_files_limit
You should set a higher value for open_files_limit in my.cnf

TABLE CACHE
Current table_cache value = 1500 tables
You have a total of 3213 tables
You have 1500 open tables.
Current table_cache hit rate is 3%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 366391 temp tables, 38% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 568 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 86
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
 

ZiRVeDeKiLeR

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

tuning-primer kurulumunu az evvel yaptım. Sanırım çıktıları ancak bir kaç gün sonra vermem faydalı olacak.

Serverde vBulletin+vBSEO kurulu. Bu hafta xCache kurulumuda yapıldı. Server bilgilerim aşağıda yer almakta.

Sitenin günlük tekili 50K ve 15 dakika cookie timeout online: 1250

tuning-primer kurmadan evvel my.cnf içeriği aşağıdaki gibiydi.


Kod:
[mysqld]
tmpdir=/temp2
#skip-name-resolve
safe-show-database
#old_passwords
back_log = 75
#skip-innodb
max_connections = 750
key_buffer_size = 32M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1500
thread_cache_size = 128
wait_timeout = 150
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 4
concurrent_insert = 2
table_lock_wait_timeout = 30
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 2M
query_cache_size = 16M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_write_lock_count = 16

[mysqld_safe]
nice = -10

[myisamchk]
tmpdir = /temp2


Fakat bir çok ayarda burada gördüğüm örneklere göre ve büyük vir vB foruma göre arada uçurumlar vardı, şu şekilde kafama göre değişiklikler yaptım ama mutlaka fazla ya da eksik satırlar ve rakamlar olduğunu düşünüyorum. Sayın iyinet admini ve diğer arkadaşların fikir ve önerilerini beklemekteyim.

Selamlar...



Şu anki my.cnf ayarlarım.


Kod:
[mysqld]
tmpdir=/temp2
skip-locking
skip-name-resolve
safe-show-database
low_priority_updates = 1
#old_passwords
back_log = 75
#skip-innodb
max_connections = 1250
key_buffer_size = 384M
myisam_sort_buffer_size = 64M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 8M
table_cache = 8000
thread_cache_size = 256
wait_timeout = 150
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 8
concurrent_insert = 2
table_lock_wait_timeout = 30
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 8M
query_cache_size = 256M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_write_lock_count = 16

[mysqld_safe]
nice = -10

[myisamchk]
tmpdir = /temp2


Server Information
Processor Information

Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Xeon(R) CPU X3210 @ 2.13GHz
Processor #1 speed: 2133.000 MHz
Processor #1 cache size: 4096 KB

Processor #2 Vendor: GenuineIntel
Processor #2 Name: Intel(R) Xeon(R) CPU X3210 @ 2.13GHz
Processor #2 speed: 1600.000 MHz
Processor #2 cache size: 4096 KB

Processor #3 Vendor: GenuineIntel
Processor #3 Name: Intel(R) Xeon(R) CPU X3210 @ 2.13GHz
Processor #3 speed: 1600.000 MHz
Processor #3 cache size: 4096 KB

Processor #4 Vendor: GenuineIntel
Processor #4 Name: Intel(R) Xeon(R) CPU X3210 @ 2.13GHz
Processor #4 speed: 1600.000 MHz
Processor #4 cache size: 4096 KB


Memory Information

Memory for crash kernel (0x0 to 0x0) notwithin permissible range
Memory: 8175120k/9175040k available (2460k kernel code, 211768k reserved, 1251k data, 196k init)
 

ZiRVeDeKiLeR

0
İyinet Üyesi
Katılım
9 Şubat 2006
Mesajlar
516
Reaction score
0
Ayarları değiştirdikten sınra 2 gündür loadlar dahada yükseldi.

tuning-primer çıktısı aşağıdaki şekilde.



-- MYSQL PERFORMANCE TUNING PRIMER --

- By: Matthew Montgomery -

MySQL Version 5.0.67-community x86_64

Uptime = 2 days 6 hrs 18 min 25 sec
Avg. qps = 101
Total Questions = 19911129
Threads Connected = 4

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

The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 59 out of 19911182 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/5.0/en/point-in-time-recovery.html

WORKER THREADS

Current thread_cache_size = 256
Current threads_cached = 144
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 1250
Current threads_connected = 4
Historic max_used_connections = 149
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 : 2 G
Configured Max Per-thread Buffers : 15 G
Configured Max Global Buffers : 650 M
Configured Max Memory Limit : 16 G
Physical Memory : 7.79 G

Max memory limit exceeds 90% of physical memory


KEY BUFFER
Current MyISAM index space = 967 M
Current key_buffer_size = 384 M
Key cache miss rate is 1 : 17679
Key buffer fill ratio = 99.00 %
You could increase key_buffer_size
It is safe to raise this up to 1/4 of total system memory;
assuming this is a dedicated database server.

QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 97 M
Current query_cache_limit = 8 M
Current Query cache Memory fill ratio = 38.15 %
Current query_cache_min_res_unit = 4 K
Query Cache is 27 % 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 fragme ntation.

MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 8 M
Current read_rnd_buffer_size = 768 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 18543 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 = 17260 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 = 8000 tables
You have a total of 462 tables
You have 1011 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 64 M
Current tmp_table_size = 64 M
Of 287383 temp tables, 41% were created on disk
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables

Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.


TABLE SCANS
Current read_buffer_size = 2 M
Current table scan ratio = 40288 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of index es.


TABLE LOCKING

Current Lock Wait ratio = 1 : 136
You may benefit from selective use of InnoDB.








top - 15:33:14 up 12 days, 14:48, 1 user, load average: 10.47, 9.06, 7.58
Tasks: 244 total, 10 running, 234 sleeping, 0 stopped, 0 zombie
Cpu(s): 71.0%us, 6.1%sy, 0.0%ni, 22.3%id, 0.0%wa, 0.1%hi, 0.4%si, 0.0%st
Mem: 8177812k total, 7607304k used, 570508k free, 224392k buffers
Swap: 8193108k total, 104k used, 8193004k free, 3876896k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
747 mysql 5 -10 904m 436m 4256 S 117 5.5 286:10.93 mysqld
26867 nobody 16 0 662m 53m 22m R 38 0.7 0:01.82 httpd
26896 nobody 15 0 662m 51m 19m S 32 0.6 0:02.52 httpd
26884 nobody 15 0 661m 45m 17m S 29 0.6 0:02.51 httpd
26799 nobody 16 0 666m 50m 15m S 17 0.6 0:02.83 httpd
26832 nobody 15 0 667m 64m 28m R 10 0.8 0:02.58 httpd
26778 nobody 15 0 673m 60m 20m S 9 0.8 0:03.42 httpd
26888 nobody 15 0 651m 43m 22m S 9 0.5 0:01.06 httpd
26838 nobody 15 0 675m 59m 14m S 8 0.7 0:02.92 httpd


 

want3d

0
İyinet Üyesi
Katılım
3 Mart 2008
Mesajlar
28
Reaction score
0
sensizolmuyor:/# ./tuning-primer.sh

- INITIAL LOGIN ATTEMPT FAILED -

Testing Stored for passwords: None Found

- RETRY LOGIN ATTEMPT FAILED -

Could not auto detect login info!

Do you have your login handy ? [y/N] : y
User: root
Password:
Would you like me to create a ~/.my.cnf file for you? [y/N] : n
- FINAL LOGIN ATTEMPT FAILED -

Unable to log into socket: /tmp/mysql.sock
sensizolmuyor:/#

bende bu hatayı alıyorum bu scriptde ne yapmam gerek.
 

exceLLency

0
İyinet Üyesi
Katılım
3 Nisan 2008
Mesajlar
10
Reaction score
0
Tavsiyeleri alalım.
PHP:
-- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.67-community i686

./tuning-primer.sh: line 407: bc: command not found
./tuning-primer.sh: line 408: bc: command not found
./tuning-primer.sh: line 409: bc: command not found
./tuning-primer.sh: line 410: bc: command not found
./tuning-primer.sh: line 411: bc: command not found
./tuning-primer.sh: line 412: bc: command not found
Uptime =  days  hrs  min  sec
Avg. qps = 22
Total Questions = 12044137
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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 34323 out of 12044659 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/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 8
Historic threads_per_sec = 1
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size

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

MEMORY USAGE
./tuning-primer.sh: line 1226: bc: command not found
./tuning-primer.sh: line 1227: bc: command not found
./tuning-primer.sh: line 1251: bc: command not found
./tuning-primer.sh: line 1254: bc: command not found
./tuning-primer.sh: line 1255: bc: command not found
./tuning-primer.sh: line 1257: bc: command not found
./tuning-primer.sh: line 1259: [: -gt: unary operator expected
./tuning-primer.sh: line 369: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 375: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 381: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 388: export: `=max_memoryHR': not a valid identifier
Max Memory Ever Allocated :  bytes
./tuning-primer.sh: line 369: [: per_thread_buffersHR: integer expression expect                                             ed
./tuning-primer.sh: line 375: [: per_thread_buffersHR: integer expression expect                                             ed
./tuning-primer.sh: line 381: [: per_thread_buffersHR: integer expression expect                                             ed
./tuning-primer.sh: line 388: export: `=per_thread_buffersHR': not a valid ident                                             ifier
Configured Max Per-thread Buffers :  bytes
./tuning-primer.sh: line 369: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 375: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 381: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 388: export: `=global_buffersHR': not a valid identifie                                             r
Configured Max Global Buffers :  bytes
./tuning-primer.sh: line 369: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 375: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 381: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 388: export: `=total_memoryHR': not a valid identifier
Configured Max Memory Limit :  bytes
./tuning-primer.sh: line 350: bc: command not found
Physical Memory :  G
Max memory limit seem to be within acceptable norms

KEY BUFFER
./tuning-primer.sh: line 668: bc: command not found
./tuning-primer.sh: line 669: bc: command not found
./tuning-primer.sh: line 350: bc: command not found
Current MyISAM index space =  M
./tuning-primer.sh: line 350: bc: command not found
Current key_buffer_size =  M
Key cache miss rate is 1 : 31639
Key buffer free ratio =  %
./tuning-primer.sh: line 706: [: -le: unary operator expected
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
./tuning-primer.sh: line 350: bc: command not found
Current sort_buffer_size =  M
./tuning-primer.sh: line 350: bc: command not found
Current read_rnd_buffer_size =  K
Sort buffer seems to be fine

JOINS
./tuning-primer.sh: line 350: bc: command not found
Current join_buffer_size =  K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 1024 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 = 64 tables
You have a total of 138 tables
You have 64 open tables.
Current table_cache hit rate is 0%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
./tuning-primer.sh: line 350: bc: command not found
Current max_heap_table_size =  M
./tuning-primer.sh: line 350: bc: command not found
Current tmp_table_size =  M
Of 2002022 temp tables, 48% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
./tuning-primer.sh: line 350: bc: command not found
Current read_buffer_size =  K
Current table scan ratio = 435 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 461
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
 

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