• 01-07-2008, 23:40:19
    #10
    Ece
    Üyeliği durduruldu
    Komuta baktım yüzde olarak değil. Sanırım kendisi belirtmeyi unutmuş. Linux da bu tip değerler çekirdek yükü olarak verilir. Yani bir çekirdeğe bindirdiği yük olarak. Hatta bazen top çıktısıne bakarken oradaki değerleri topladığınızda 100'ün üzerine çıkar sebebi de budur.

    4 işlemcili bir sunucuda 5.9 = 23,6% yapıyor. Sanırım kendisi kodu kendisine göre hazırladı veya bunu göz ardı etti.

    Ayrıca iki makinein özellikleri farklı iken aynı ayar dosyası ile devam etmeniz bence doğru değil. İkisinin kaldırabileceği yükler farklıyken aynı ayarları yapmanız da buna etkili olmuş olabilir. Mesela my.cnf içerisinde işlemci çekirdek sayısı ile alakalı bir bölüm var. Şu andaki duruma bakarsak en basitinden ilk bunun değişmesi gerekli. Sonrasında diğer ayarlarında değişmesi gerekli. Bence mysql optimizasyonunu tekrar düşünün. Bu konuda az önce söylediğim gibi yardıma ihtiyacınız olursa buraya söylediğim verileri yazın. Yardımcı olalım.

    Not: Phpmyadmindeki kırmızı verileri almadan önce mysql restart yapın ve 5 dakika sonra oradaki değerleri alın buraya yazın. Uzun süredir birikmiş olan veriler gerçekçi olmayabilir.
  • 01-07-2008, 23:42:49
    #11
    evet kod Ece'nin dediği gibi çekirdek yükünü gösteriyor. Bizde şu anda 2 ve 4 çekirdekli makineler olduğu için kodu o şekilde ayarladım her makinede kullanmak için.

    Kodları kendimize göre yapınca başkasını düşünmedik Kusura bakma elazığlı. Yaptığım programda makine çekirdek sayısını otomatik alıp ayarlıyor ama bash kodunda yoktu bu.

    Ayrıca bende mysql'in tekrardan optimize edilmesinden yanayım. didik didik edelim mysql'i yaz buraya gerekenleri
  • 01-07-2008, 23:46:10
    #12
    sunucuoptimizasyon.com
    son yaptığımız incelemelerde büyük sqllü bir sitemizin veritabanında arıza olacağı kanaatine vardık onla uğraşmaktayız yine düzelmesse optimizasyon için konuya dönerim
  • 01-07-2008, 23:49:56
    #13
    evet veri tabanı tablolarını her gün onarmanı tavsiye ederim. Sunuculara sabah aç karnına tavsiye ediyorum herkes birer kez sabahları versin sunucusuna

    bir de ilave olacak slow queryleri takip etmeni öneririm. O da çok can sıkıyor. Onlar içinde ağrı kesici yazarız eğer lazım olursa kökünden kuruturuz

    Elazığlı168 adlı üyeden alıntı: mesajı görüntüle
    son yaptığımız incelemelerde büyük sqllü bir sitemizin veritabanında arıza olacağı kanaatine vardık onla uğraşmaktayız yine düzelmesse optimizasyon için konuya dönerim
  • 02-07-2008, 17:07:21
    #14
    dna
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Benim ayarlarıma bakıp varsa bı opti soylerseniz sevınırım mysql cok cpu yıyo ve ram cok kullanılıyo...
    xcache kurulu

    Top Çıktısı :

    top - 16:53:32 up 1 day,  1:40,  2 users,  load average: 1.91, 1.65, 1.59
    Tasks: 106 total,   2 running, 101 sleeping,   0 stopped,   3 zombie
    Cpu(s): 15.3% us, 82.8% sy,  0.0% ni,  1.8% id,  0.0% wa,  0.0% hi,  0.0% si
    Mem:   1554728k total,  1395604k used,   159124k free,    42532k buffers
    Swap:  1052248k total,     1260k used,  1050988k free,   977972k cached
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    29976 mysql     16   0  190m  96m 3568 S  171  6.3 294:44.29 mysqld
    Makina Özellikleri :

    Processor #1 Vendor: GenuineIntel
    Processor #1 Name: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
    Processor #1 speed: 2502.976 MHz
    Processor #1 cache size: 3072 KB
     
    Processor #2 Vendor: GenuineIntel
    Processor #2 Name: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
    Processor #2 speed: 2502.976 MHz
    Processor #2 cache size: 3072 KB
    my.cnf ayarlarım

    [mysqld]
    skip-innodb
    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 = 850
    low_priority_updates = 1
    max_connections = 240
    thread_cache_size = 200
    key_buffer = 125M
    query-cache-type = 1
    query-cache-size = 24M
    query_cache_limit = 8M
    safe-show-database
    set-variable=local-infile=0
    max_allowed_packet = 64M
    read_buffer_size = 4M
    [mysql.server]
    user=mysql
    old-passwords = 1
    ./tuning-primer.sh Çıktısı

      -- MYSQL PERFORMANCE TUNING PRIMER --
                 - By: Matthew Montgomery -
    MySQL Version 5.0.51a-community i686
    Uptime = 0 days 8 hrs 15 min 53 sec
    Avg. qps = 22
    Total Questions = 682920
    Threads Connected = 3
    Warning: Server has not been running for at least 48hrs.
    It may not be safe to use these recommendations
    To find out more information on how each of these
    runtime variables effects performance visit:
    MySQL :: MySQL 5.0 Reference Manual :: 5.1.3 System Variables
    Visit MySQL :: MySQL Enterprise Advisors
    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 302 out of 682961 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 MySQL :: MySQL 5.0 Reference Manual :: 6.3 Point-in-Time Recovery
    WORKER THREADS
    Current thread_cache_size = 200
    Current threads_cached = 32
    Current threads_per_sec = 0
    Historic threads_per_sec = 0
    Your thread_cache_size is fine
    MAX CONNECTIONS
    Current max_connections = 240
    Current threads_connected = 2
    Historic max_used_connections = 34
    The number of used connections is 14% of the configured maximum.
    Your max_connections variable seems to be fine.
    MEMORY USAGE
    Max Memory Ever Allocated : 381 M
    Configured Max Per-thread Buffers : 1 G
    Configured Max Global Buffers : 159 M
    Configured Max Memory Limit : 1 G
    Physical Memory : 1.48 G
    Max memory limit exceeds 90% of physical memory
    KEY BUFFER
    Current MyISAM index space = 494 M
    Current key_buffer_size = 125 M
    Key cache miss rate is 1 : 3983
    Key buffer fill ratio = 46.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 = 24 M
    Current query_cache_used = 8 M
    Current query_cache_limit = 8 M
    Current Query cache Memory fill ratio = 35.13 %
    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 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 = 1950 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 = 850 tables
    You have a total of 308 tables
    You have 490 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 7883 temp tables, 2% 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 = 3 M
    Current table scan ratio = 5838 : 1
    read_buffer_size seems to be fine
    TABLE LOCKING
    Current Lock Wait ratio = 1 : 77
    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'.
  • 02-07-2008, 18:44:48
    #15
    Sunucunun günlük ortalama tekil hiti ne kadar? ve phpmyadminde kırmızı olarak gözlemlediğiniz değerleri buraya yazarsanız daha iyi önerilerde bulunabiliriz sanırım. Bu bilgiler tam yeterli değil

    dna adlı üyeden alıntı: mesajı görüntüle
    Benim ayarlarıma bakıp varsa bı opti soylerseniz sevınırım mysql cok cpu yıyo ve ram cok kullanılıyo...
    xcache kurulu

    Top Çıktısı :

    top - 16:53:32 up 1 day,  1:40,  2 users,  load average: 1.91, 1.65, 1.59
    Tasks: 106 total,   2 running, 101 sleeping,   0 stopped,   3 zombie
    Cpu(s): 15.3% us, 82.8% sy,  0.0% ni,  1.8% id,  0.0% wa,  0.0% hi,  0.0% si
    Mem:   1554728k total,  1395604k used,   159124k free,    42532k buffers
    Swap:  1052248k total,     1260k used,  1050988k free,   977972k cached
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    29976 mysql     16   0  190m  96m 3568 S  171  6.3 294:44.29 mysqld
    Makina Özellikleri :

    Processor #1 Vendor: GenuineIntel
    Processor #1 Name: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
    Processor #1 speed: 2502.976 MHz
    Processor #1 cache size: 3072 KB
     
    Processor #2 Vendor: GenuineIntel
    Processor #2 Name: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
    Processor #2 speed: 2502.976 MHz
    Processor #2 cache size: 3072 KB
    my.cnf ayarlarım

    [mysqld]
    skip-innodb
    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 = 850
    low_priority_updates = 1
    max_connections = 240
    thread_cache_size = 200
    key_buffer = 125M
    query-cache-type = 1
    query-cache-size = 24M
    query_cache_limit = 8M
    safe-show-database
    set-variable=local-infile=0
    max_allowed_packet = 64M
    read_buffer_size = 4M
    [mysql.server]
    user=mysql
    old-passwords = 1
    ./tuning-primer.sh Çıktısı

      -- MYSQL PERFORMANCE TUNING PRIMER --
                 - By: Matthew Montgomery -
    MySQL Version 5.0.51a-community i686
    Uptime = 0 days 8 hrs 15 min 53 sec
    Avg. qps = 22
    Total Questions = 682920
    Threads Connected = 3
    Warning: Server has not been running for at least 48hrs.
    It may not be safe to use these recommendations
    To find out more information on how each of these
    runtime variables effects performance visit:
    MySQL :: MySQL 5.0 Reference Manual :: 5.1.3 System Variables
    Visit MySQL :: MySQL Enterprise Advisors
    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 302 out of 682961 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 MySQL :: MySQL 5.0 Reference Manual :: 6.3 Point-in-Time Recovery
    WORKER THREADS
    Current thread_cache_size = 200
    Current threads_cached = 32
    Current threads_per_sec = 0
    Historic threads_per_sec = 0
    Your thread_cache_size is fine
    MAX CONNECTIONS
    Current max_connections = 240
    Current threads_connected = 2
    Historic max_used_connections = 34
    The number of used connections is 14% of the configured maximum.
    Your max_connections variable seems to be fine.
    MEMORY USAGE
    Max Memory Ever Allocated : 381 M
    Configured Max Per-thread Buffers : 1 G
    Configured Max Global Buffers : 159 M
    Configured Max Memory Limit : 1 G
    Physical Memory : 1.48 G
    Max memory limit exceeds 90% of physical memory
    KEY BUFFER
    Current MyISAM index space = 494 M
    Current key_buffer_size = 125 M
    Key cache miss rate is 1 : 3983
    Key buffer fill ratio = 46.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 = 24 M
    Current query_cache_used = 8 M
    Current query_cache_limit = 8 M
    Current Query cache Memory fill ratio = 35.13 %
    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 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 = 1950 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 = 850 tables
    You have a total of 308 tables
    You have 490 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 7883 temp tables, 2% 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 = 3 M
    Current table scan ratio = 5838 : 1
    read_buffer_size seems to be fine
    TABLE LOCKING
    Current Lock Wait ratio = 1 : 77
    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'.
  • 02-07-2008, 19:15:32
    #16
    Tahsin ALTAY adlı üyeden alıntı: mesajı görüntüle
    Sunucunun günlük ortalama tekil hiti ne kadar? ve phpmyadminde kırmızı olarak gözlemlediğiniz değerleri buraya yazarsanız daha iyi önerilerde bulunabiliriz sanırım. Bu bilgiler tam yeterli değil

    Son 10 gün ortalama tekıl 16k phpmyadminde kırmızı yazan yeri ece arkadaşımızda demişde ben oyle bırsey goremiyorum tam neresinde bı tarıf edersenız veya kırmızı gozuken yerın resmini koyabılırsenız bulabılırım sanırsam.
  • 02-07-2008, 19:24:16
    #17
    Örnek resimleri koydum

    [media]http://www.hizliresim.com/2008/7/2/3044.jpg[/media]

    [media]http://www.hizliresim.com/2008/7/2/3046.jpg[/media]
  • 02-07-2008, 19:37:36
    #18
    Linkde resim olarak ekledim

    http://img225.imageshack.us/img225/2...min2116at4.png