• 04-09-2010, 10:51:52
    #1
    Üyeliği durduruldu
    merhabalar arkadaşlar yardıma ihtiyacım var bol hitli bir arkadaşlık sistemim var 2 gb vps 'in daily log dan baktığımda %45 ram tüketimi yapıyor ve cpu load 4.15 lerde filan ara ara donmalar ping düşmeleri vs yaşamaktayım

    yardımlarınızı bekliyorum

    Vps 2 gb ram lidir
    Q9400 işlemcili
    Vmware7.0.1


    MYSQL Tuning Raporu aşağıdadır
    yardımcı olcak arkadaşlara şimdiden teşekkür ederim

    not : bu arada my.cnf ye nasıl gireceğim onuda kodsal ssh den anlatırsanız sevinirim

    tşkler

    MAX CONNECTIONS
    Current max_connections = 750
    Current threads_connected = 6
    Historic max_used_connections = 54
    The number of used connections is 7% 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

    No InnoDB Support Enabled!

    MEMORY USAGE
    Max Memory Ever Allocated : 494 M
    Configured Max Per-thread Buffers : 4.53 G
    Configured Max Global Buffers : 160 M
    Configured Max Memory Limit : 4.68 G
    Physical Memory : 1.97 G

    nMax memory limit exceeds 90% of physical memory

    KEY BUFFER
    Current MyISAM index space = 34 M
    Current key_buffer_size = 128 M
    Key cache miss rate is 1 : 5884
    Key buffer free ratio = 86 %
    Your key_buffer_size seems to be fine

    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 32 M
    Current query_cache_used = 23 M
    Current query_cache_limit = 4 M
    Current Query cache Memory fill ratio = 73.42 %
    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 = 1 M
    Sort buffer seems to be fine

    JOINS
    Current join_buffer_size = 1.00 M
    You have had 535 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 = 8192 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_open_cache = 2000 tables
    Current table_definition_cache = 256 tables
    You have a total of 3937 tables
    You have 2000 open tables.
    Current table_cache hit rate is 4%
    , while 100% of your table cache is in use
    You should probably increase your table_cache
    You should probably increase your table_definition_cache value.

    TEMP TABLES
    Current max_heap_table_size = 16 M
    Current tmp_table_size = 16 M
    Of 141507 temp tables, 45% 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 = 212 : 1
    read_buffer_size seems to be fine

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

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

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

    MySQL Version 5.1.48 i686

    Uptime = 2 days 2 hrs 10 min 16 sec
    Avg. qps = 84
    Total Questions = 15304144
    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/5.1/...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.000000 sec.
    You have 168 out of 15304165 that take longer than 10.000000 sec. to complete
    Your long_query_time seems to be fine

    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.1/...-recovery.html

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

    MAX CONNECTIONS
    Current max_connections = 750
    Current threads_connected = 1
    Historic max_used_connections = 54
    The number of used connections is 7% 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

    No InnoDB Support Enabled!

    MEMORY USAGE
    Max Memory Ever Allocated : 494 M
    Configured Max Per-thread Buffers : 4.53 G
    Configured Max Global Buffers : 160 M
    Configured Max Memory Limit : 4.68 G
    Physical Memory : 1.97 G

    nMax memory limit exceeds 90% of physical memory

    KEY BUFFER
    Current MyISAM index space = 34 M
    Current key_buffer_size = 128 M
    Key cache miss rate is 1 : 5850
    Key buffer free ratio = 87 %
    Your key_buffer_size seems to be fine

    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 32 M
    Current query_cache_used = 23 M
    Current query_cache_limit = 4 M
    Current Query cache Memory fill ratio = 72.93 %
    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 = 1 M
    Sort buffer seems to be fine

    JOINS
    Current join_buffer_size = 1.00 M
    You have had 541 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 = 8192 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_open_cache = 2000 tables
    Current table_definition_cache = 256 tables
    You have a total of 3937 tables
    You have 2000 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
    You should probably increase your table_definition_cache value.

    TEMP TABLES
    Current max_heap_table_size = 16 M
    Current tmp_table_size = 16 M
    Of 141892 temp tables, 45% 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 = 212 : 1
    read_buffer_size seems to be fine

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

    root@server [~]#
  • 04-09-2010, 16:57:19
    #2
    Misafir
    Aşağıdaki ayarları linux de my.cnf (/etc/my.cnf) dosyasında [mysqld] bölümü altına ekleyin, eğer eklediğiniz ayar zaten varsa değiştirin. Aynı ayarın tekrar etmemesine dikkat edin.

    İşlemlere başlamadan önce my.cnf dosyanızın bir yedeğini almayı unutmayın!

    Ayarlarınızı optimize etmek için zaman zaman mysql performans raporu almayı unutmayın.

    Aşağıdaki ayarların devreye girebilmesi için ayarları tamamalyıp my.nf dosyanızı kaydetmenizin ardından service mysql restart yada service mysqld restart komutunu çalıştırınız.

    256Mb-512M arasında belleğe sahip serverlar (VPS ler) için:

    Alıntı
    skip-locking # serverda sadece 1 MySQL varsa
    skip-name-resolve
    max_connections = 300 # cok yogun sitelerde bu deger arttirilabilir
    thread_cache_size = 128
    key_buffer = 32M
    query_cache_type = 1
    query_cache_size = 16M
    query_cache_limit = 4M
    table_cache = 2000 # cok fazla tablolu veritabanlarinda bu deger arttirilabilir
    low_priority_updates = 1
    ### innodb varsa asagidaki ayarlari aciniz
    #innodb_buffer_pool_size=16M
    #innodb_additional_mem_pool_size=8M
    #innodb_thread_concurrency=8
    #innodb_flush_method=O_DIRECT
    512Mb-2Gb arasında belleğe sahip serverlar için:

    Alıntı
    skip-locking # serverda sadece 1 MySQL varsa
    skip-name-resolve
    max_connections = 500 # cok yogun sitelerde bu deger arttirilabilir
    thread_cache_size = 128
    key_buffer = 64M
    query_cache_type = 1
    query_cache_size = 32M
    query_cache_limit = 4M
    table_cache = 2000 # cok fazla tablolu veritabanlarinda bu deger arttirilabilir
    low_priority_updates = 1
    ### innodb varsa asagidaki ayarlari aciniz
    #innodb_buffer_pool_size=64M
    #innodb_additional_mem_pool_size=32M
    #innodb_thread_concurrency=8
    #innodb_flush_method=O_DIRECT
    2Gb-4Gb arasında belleğe sahip serverlar için:

    Alıntı
    skip-locking # serverda sadece 1 MySQL varsa
    skip-name-resolve
    max_connections = 500 # cok yogun sitelerde bu deger arttirilabilir
    thread_cache_size = 128
    key_buffer = 128M
    query_cache_type = 1
    query_cache_size = 32M
    query_cache_limit = 4M
    table_cache = 2000 # cok fazla tablolu veritabanlarinda bu deger arttirilabilir
    low_priority_updates = 1
    ### innodb varsa asagidaki ayarlari aciniz
    #innodb_buffer_pool_size=256M
    #innodb_additional_mem_pool_size=64M
    #innodb_thread_concurrency=8
    #innodb_flush_method=O_DIRECT
    4Gb+ belleğe sahip serverlar için:

    Alıntı
    skip-locking # serverda sadece 1 MySQL varsa
    skip-name-resolve
    max_connections = 500 # cok yogun sitelerde bu deger arttirilabilir
    thread_cache_size = 128
    key_buffer = 256M
    query_cache_type = 1
    query_cache_size = 64M
    query_cache_limit = 4M
    table_cache = 2000 # cok fazla tablolu veritabanlarinda bu deger arttirilabilir
    low_priority_updates = 1
    ### innodb varsa asagidaki ayarlari aciniz
    #innodb_buffer_pool_size=384M #Innodb kullanimi cok ise 384M, 1024M e kadar arttirilabilir
    #innodb_additional_mem_pool_size=96M
    #innodb_thread_concurrency=8
    #innodb_flush_method=O_DIRECT
    İyi Forumlar..
  • 04-09-2010, 21:58:16
    #3
    Üyeliği durduruldu
    tşk ederim fakat bu ayarlar 1mysql e göre ayarlanmış sanırım
    oysa ki 70 adet site var vps de
    bu ayarlar sanırım benim sisteme göre değil
    yani tek bir web sitesi yok
    tşkler yinede