Diễn Đàn Tin Học

+ Reply to Thread
Trang 3 / 5 FirstFirst 12345 LastLast
Hiển thị kết quả từ 21 đến 30 / 47
  1. #21
    Tham gia
    09-08-2009
    Location
    MAYCHU.NET
    Bài viết
    909
    Like
    10
    Thanked 21 Times in 19 Posts
    Em chạy 2 công cụ này rồi paste output lên xem thử nhe:
    Code:
    wget http://hackmysql.com/scripts/mysqlreport
    chmod +x mysqlreport
    ./mysqlreport --user=root --password
    copy output dán lên (nhớ xóa pass đi trước khi post)

    Code:
    wget http://mysqltuner.pl/mysqltuner.pl
    chmod +x mysqltuner.pl
    ./mysqltuner.pl
    Dùng 2 công cụ này để xem có tối ưu được MySQL không, nếu không thì đổi host thôi.

  2. #22
    Tham gia
    18-05-2007
    Bài viết
    1,452
    Like
    4
    Thanked 30 Times in 24 Posts
    Server hay bị tro mặc dù chưa có truy cập (site mới), data chưa đến 100mb (zip) là do gì các bác? 1 ngày phải vào restart mấy lần mới ổn

  3. #23
    Tham gia
    22-09-2010
    Bài viết
    454
    Like
    1
    Thanked 8 Times in 8 Posts
    Use of uninitialized value in multiplication (*) at ./mysqlreport line 829, <STDIN> line 1.
    Use of uninitialized value in formline at ./mysqlreport line 1227, <STDIN> line 1.
    MySQL 5.0.77 uptime 1 10:22:46 Mon Apr 25 07:36:04 2011

    __ Key __________________________________________________ _______________
    Buffer used 7.08M of 8.00M %Used: 88.48
    Current 5.00M %Usage: 62.47
    Write hit 27.99%
    Read hit 99.06%

    __ Questions __________________________________________________ _________
    Total 4.51M 36.4/s
    DMS 3.73M 30.2/s %Total: 82.74
    Com_ 408.61k 3.3/s 9.06
    COM_QUIT 369.77k 3.0/s 8.20
    +Unknown 200 0.0/s 0.00
    Slow 10 s 233 0.0/s 0.01 %DMS: 0.01 Log: OFF
    DMS 3.73M 30.2/s 82.74
    SELECT 3.33M 26.9/s 73.85 89.26
    UPDATE 176.22k 1.4/s 3.91 4.72
    INSERT 138.45k 1.1/s 3.07 3.71
    DELETE 81.72k 0.7/s 1.81 2.19
    REPLACE 4.33k 0.0/s 0.10 0.12
    Com_ 408.61k 3.3/s 9.06
    change_db 370.27k 3.0/s 8.21
    set_option 36.58k 0.3/s 0.81
    show_fields 1.04k 0.0/s 0.02

    __ SELECT and Sort __________________________________________________ ___
    Scan 1.21M 9.8/s %SELECT: 36.35
    Range 510.90k 4.1/s 15.34
    Full join 37.68k 0.3/s 1.13
    Range check 0 0/s 0.00
    Full rng join 0 0/s 0.00
    Sort scan 798.00k 6.4/s
    Sort range 451.27k 3.6/s
    Sort mrg pass 168.43k 1.4/s

    __ Table Locks __________________________________________________ _______
    Waited 9.44k 0.1/s %Total: 0.17
    Immediate 5.68M 45.9/s

    __ Tables __________________________________________________ ____________
    Open 64 of 64 %Cache: 100.00
    Opened 446.79k 3.6/s

    __ Connections __________________________________________________ _______
    Max used 17 of 100 %Max: 17.00
    Total 369.77k 3.0/s

    __ Created Temp __________________________________________________ ______
    Disk table 59.56k 0.5/s
    Table 392.62k 3.2/s Size: 32.0M
    File 335.88k 2.7/s

    __ Threads __________________________________________________ ___________
    Running 1 of 1
    Cached 0 of 0 %Hit: 0
    Created 369.77k 3.0/s
    Slow 70 0.0/s

    __ Aborted __________________________________________________ ___________
    Clients 0 0/s
    Connects 0 0/s

    __ Bytes __________________________________________________ _____________
    Sent 1.85G 15.0k/s
    Received 905.09M 7.3k/s

    __ InnoDB Buffer Pool __________________________________________________
    Usage 2.17M of 8.00M %Used: 27.15
    Read hit 100.00%
    Pages
    Free 373 %Total: 72.85
    Data 136 26.56 %Drty: 5.88
    Misc 3 0.59
    Latched 0.00
    Reads 12.80M 103.5/s
    From file 14 0.0/s 0.00
    Ahead Rnd 1 0.0/s
    Ahead Sql 0 0/s
    Writes 267.59k 2.2/s
    Flushes 42.38k 0.3/s
    Wait Free 0 0/s

    __ InnoDB Lock __________________________________________________ _______
    Waits 7 0.0/s
    Current 0
    Time acquiring
    Total 8250 ms
    Average 1178 ms
    Max ***5 ms

    __ InnoDB Data, Pages, Rows ____________________________________________
    Data
    Reads 27 0.0/s
    Writes 95.86k 0.8/s
    fsync 69.86k 0.6/s
    Pending
    Reads 0
    Writes 0
    fsync 0

    Pages
    Created 115 0.0/s
    Read 21 0.0/s
    Written 42.38k 0.3/s

    Rows
    Deleted 91 0.0/s
    Inserted 2.01k 0.0/s
    Read 9.99M 80.7/s
    Updated 45.00k 0.4/s



    ===========> chỉ em đọc cái chỉ số đi bác, chứ cái mysqltuner thì dùng rồi.

  4. #24
    Tham gia
    09-08-2009
    Location
    MAYCHU.NET
    Bài viết
    909
    Like
    10
    Thanked 21 Times in 19 Posts
    mysqltuner chạy xong em có chỉnh lại my.cnf chưa? nó chỉ giúp mình xem nên chỉnh cái nào, mà không tự động chỉnh dùm mình
    cái report thì
    - nên tăng buffer lên, 8MB ko đủ khi có truy vấn lớn hơn lúc em report (lúc report, 17 connections dùng hết 88% buffer)
    - cache cho thấy 100%, sử dụng 100%, liệu số table cache 64 có đủ chưa? nếu tăng lên xem lại thread cache, hiện tại chắc 100% rồi nên 0 có thread nào được cache, --> cần chỉnh lại phần cache, chắc bên tuner cũng báo đỏ cái này
    - ứng dụng em xài gì mà có InnoDB? nếu ko xài thì tắt nó đi (Mysql 5.0 thì : skip-innodb, mysql 5.1 thì ignore-builtin-innodb)
    - site có hơn 300 connections mà mysql connections chỉ có 100 thôi? dựa theo ứng dụng, mỗi connection đến apache chạy bao nhiêu connection mysql? nhân lên: số connect apache x số connect sql / mỗi user = tổng số mysql connection cho phép, để tăng performance, chạy thử nếu ram ko dủ thì giảm số connect apache lại (trong httpd.conf)

  5. #25
    Tham gia
    22-09-2010
    Bài viết
    454
    Like
    1
    Thanked 8 Times in 8 Posts
    Cám ơn anh trước giờ thì em dùng mysqltuner nhiều lần rồi . Có cái nhiều khi thấy RAM còn đầy mà nó cứ báo thiếu RAM.

    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Variables to adjust:
    *** MySQL's maximum memory usage is dangerously high ***
    *** Add RAM before increasing MySQL buffer variables ***
    key_buffer_size (> 92.1M)
    join_buffer_size (> 128.0K, or always use indexes with joins)
    ================================================== =================

    Cái report kia em chỉnh ổn rồi.... đã đọc được các thông số. InnoDb là cái livezilla (dùng thử xem sao)

  6. #26
    Tham gia
    09-08-2009
    Location
    MAYCHU.NET
    Bài viết
    909
    Like
    10
    Thanked 21 Times in 19 Posts
    Quote Được gửi bởi cvcx View Post
    Cám ơn anh trước giờ thì em dùng mysqltuner nhiều lần rồi . Có cái nhiều khi thấy RAM còn đầy mà nó cứ báo thiếu RAM.

    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Variables to adjust:
    *** MySQL's maximum memory usage is dangerously high ***
    *** Add RAM before increasing MySQL buffer variables ***
    key_buffer_size (> 92.1M)
    join_buffer_size (> 128.0K, or always use indexes with joins)
    ================================================== =================

    Cái report kia em chỉnh ổn rồi.... đã đọc được các thông số. InnoDb là cái livezilla (dùng thử xem sao)
    MySQL's maximum memory usage is dangerously high <== cấu hình chưa ổn em à.

    Post cái my.cnf và output tương ứng với my.cnf đó
    (các công cụ này chỉ report cho mình biết trạng thái họat động thôi, mysqld chạy càng lâu càng tốt, nếu mới restart thì đợi ít nhất 5 phút sau hãy chạy tuner)
    Vấn đề là chỉnh lại my.cnf bằng tay dựa theo report của tuner

  7. #27
    Tham gia
    22-09-2010
    Bài viết
    454
    Like
    1
    Thanked 8 Times in 8 Posts
    Em thấy mình thiết lập cũng không đến nổi nào... Nhờ anh tư vấn thêm.


    ==========================

    Use of uninitialized value in multiplication (*) at ./mysqlreport line 829, <STDIN> line 1.
    Use of uninitialized value in formline at ./mysqlreport line 1227, <STDIN> line 1.
    MySQL 5.0.77 uptime 0 0:12:5 Mon Apr 25 22:07:16 2011

    __ Key __________________________________________________ _______________
    Buffer used 6.34M of 32.00M %Used: 19.82
    Current 10.03M %Usage: 31.34
    Write hit 35.11%
    Read hit 99.69%

    __ Questions __________________________________________________ _________
    Total 42.76k 59.0/s
    DMS 17.21k 23.7/s %Total: 40.25
    QC Hits 16.97k 23.4/s 39.68
    Com_ 4.47k 6.2/s 10.45
    COM_QUIT 4.12k 5.7/s 9.63
    -Unknown 5 0.0/s 0.01
    Slow 10 s 1 0.0/s 0.00 %DMS: 0.01 Log: OFF
    DMS 17.21k 23.7/s 40.25
    SELECT 13.86k 19.1/s 32.41 80.54
    INSERT 1.40k 1.9/s 3.27 8.12
    UPDATE 1.38k 1.9/s 3.22 8.00
    DELETE 548 0.8/s 1.28 3.18
    REPLACE 28 0.0/s 0.07 0.16
    Com_ 4.47k 6.2/s 10.45
    change_db 4.13k 5.7/s 9.67
    set_option 307 0.4/s 0.72
    show_variab 9 0.0/s 0.02

    __ SELECT and Sort __________________________________________________ ___
    Scan 6.32k 8.7/s %SELECT: 45.58
    Range 2.11k 2.9/s 15.21
    Full join 66 0.1/s 0.48
    Range check 0 0/s 0.00
    Full rng join 0 0/s 0.00
    Sort scan 5.55k 7.7/s
    Sort range 2.82k 3.9/s
    Sort mrg pass 157 0.2/s

    __ Query Cache __________________________________________________ _______
    Memory usage 8.40M of 32.00M %Used: 26.26
    Block Fragmnt 12.68%
    Hits 16.97k 23.4/s
    Inserts 10.03k 13.8/s
    Insrt:Prune 10.03k:1 13.8/s
    Hit:Insert 1.69:1

    __ Table Locks __________________________________________________ _______
    Waited 166 0.2/s %Total: 0.64
    Immediate 25.95k 35.8/s

    __ Tables __________________________________________________ ____________
    Open 256 of 256 %Cache: 100.00
    Opened 549 0.8/s

    __ Connections __________________________________________________ _______
    Max used 7 of 300 %Max: 2.33
    Total 4.12k 5.7/s

    __ Created Temp __________________________________________________ ______
    Disk table 253 0.3/s
    Table 3.83k 5.3/s Size: 32.0M
    File 307 0.4/s

    __ Threads __________________________________________________ ___________
    Running 1 of 1
    Cached 6 of 256 %Hit: 99.83
    Created 7 0.0/s
    Slow 0 0/s

    __ Aborted __________________________________________________ ___________
    Clients 0 0/s
    Connects 2 0.0/s

    __ Bytes __________________________________________________ _____________
    Sent 1.74G 2.4M/s
    Received 7.09M 9.8k/s

    __ InnoDB Buffer Pool __________________________________________________
    Usage 2.34M of 8.00M %Used: 29.30
    Read hit 99.94%
    Pages
    Free 362 %Total: 70.70
    Data 148 28.91 %Drty: 2.03
    Misc 2 0.39
    Latched 0.00
    Reads 183.17k 252.7/s
    From file 110 0.2/s 0.06
    Ahead Rnd 3 0.0/s
    Ahead Sql 1 0.0/s
    Writes 2.46k 3.4/s
    Flushes 633 0.9/s
    Wait Free 0 0/s

    __ InnoDB Lock __________________________________________________ _______
    Waits 0 0/s
    Current 0
    Time acquiring
    Total 0 ms
    Average 0 ms
    Max 0 ms

    __ InnoDB Data, Pages, Rows ____________________________________________
    Data
    Reads 131 0.2/s
    Writes 1.13k 1.6/s
    fsync 688 0.9/s
    Pending
    Reads 0
    Writes 0
    fsync 0

    Pages
    Created 2 0.0/s
    Read 146 0.2/s
    Written 633 0.9/s

    Rows
    Deleted 20 0.0/s
    Inserted 37 0.1/s
    Read 117.37k 161.9/s
    Updated 370 0.5/s

    ====================
    >> MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
    >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >> Run with '--help' for additional options and output filtering
    Please enter your MySQL administrative login: root
    copconPlease enter your MySQL administrative password:

    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.77
    [OK] Operating on 32-bit architecture with less than 2GB RAM

    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 303M (Tables: 189)
    [--] Data in InnoDB tables: 1M (Tables: 33)
    [--] Data in MEMORY tables: 1M (Tables: 16)
    [!!] Total fragmented tables: 28

    -------- Security Recommendations -------------------------------------------

    [!!] User '@localhost' has no password set.

    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 9m 15s (31K q [57.544 qps], 3K conn, TX: 1B, RX: 5M)
    [--] Reads / Writes: 81% / 19%
    [--] Total buffers: 90.0M global + 6.6M per thread (300 max threads)
    [!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
    [!!] Maximum possible memory usage: 2.0G (203% of installed RAM)
    [OK] Slow queries: 0% (1/31K)
    [OK] Highest usage of available connections: 2% (7/300)
    [OK] Key buffer size / total MyISAM indexes: 32.0M/92.1M
    [OK] Key buffer hit rate: 99.7% (1M cached / 6K reads)
    [OK] Query cache efficiency: 54.2% (12K cached / 23K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 2% (137 temp sorts / 6K sorts)
    [!!] Joins performed without indexes: 52
    [OK] Temporary tables created on disk: 5% (174 on disk / 3K total)
    [OK] Thread cache hit rate: 99% (7 created / 3K connections)
    [OK] Table cache hit rate: 74% (256 open / 343 opened)
    [OK] Open file limit used: 26% (392/1K)
    [OK] Table locks acquired immediately: 99% (19K immediate / 19K locks)
    [OK] InnoDB data size / buffer pool: 1.4M/8.0M

    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Variables to adjust:
    *** MySQL's maximum memory usage is dangerously high ***
    *** Add RAM before increasing MySQL buffer variables ***
    join_buffer_size (> 128.0K, or always use indexes with joins)


    ==============my.cnf

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1

    # Disabling symbolic-links is recommended to prevent assorted security risks;
    # to do so, uncomment this line:
    # symbolic-links=0
    #skip-innodb
    skip-bdb
    query_cache_size = 32M
    key_buffer_size=32M
    max_connections=400
    read_buffer_size=3M
    sort_buffer_size=3M
    table_cache = 256
    thread_cache_size = 256


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

  8. #28
    Tham gia
    09-08-2009
    Location
    MAYCHU.NET
    Bài viết
    909
    Like
    10
    Thanked 21 Times in 19 Posts
    Vậy mà ko đến nỗi nào sao? (dù em đã tăng connections từ 100 lên 300)

    1. Security: [!!] User '@localhost' has no password set.
    --> Nên buộc tất cả user kết nối mysql phải dùng password

    2. [!!] Total fragmented tables: 28
    --> Nên dùng lệnh SQL để optimize các bảng (có thể optimize từng bảng qua phpmyadmin, nhưng thủ công lắm; nếu sourcecode ghi và xóa record thường xuyên khi chạy ứng dụng thì nên cho chạy cronjob thông qua 1 hàm PHP)
    Code:
    OPTIMIZE $table_name
    3a. [!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
    3b. [!!] Maximum possible memory usage: 2.0G (203% of installed RAM)

    Hệ thống của em có 1 GB RAM, em cho phép mysqld dùng đến 2GB ?
    *** MySQL's maximum memory usage is dangerously high ***
    Cách tính như sau:
    total =
    innodb_buffer_pool_size
    + key_buffer_size
    + innodb_additional_mem_pool_size
    + innodb_log_buffer_size
    + max_connections x ( sort_buffer_size + read_buffer_size + binlog_cache_size +
    maximum_thread_stack_size);
    Trong Linux, sort_buffer_size nên đặt từ 256KB đến 2MB, vượt quá sẽ làm chậm phân phát bộ nhớ (slow down memory allocation).
    Tham khảo thêm: http://dev.mysql.com/doc/refman/5.0/...variables.html
    Nhưng khuyên em:
    Code:
    key_buffer_size = 8M
    join_buffer_size = 256K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    sort_buffer_size = 256K
    các số này có thể cần chỉnh 1,2 lần nữa (số max_connections thì đợi chạy được liên tục > 10 ngày, xem cao nhất bao nhiêu rồi chỉnh lại, tạm thời 300 là hợp lý theo netstat)


    Sau khi chỉnh lại my.cnf, nếu còn báo lỗi [!!] Joins performed without indexes thì xem lại code php có MySQL statement nào dùng đến Join, để chỉnh lại

  9. #29
    Tham gia
    07-03-2010
    Bài viết
    28
    Like
    0
    Thanked 0 Times in 0 Posts
    Kết quả output anh à, anh xem giùm em với ạ.
    Code:
    Use of uninitialized value $is in multiplication (*) at ./mysqlreport line 829.
    Use of uninitialized value in formline at ./mysqlreport line 1227.
    MySQL 5.1.49-3           uptime 0 21:9:13       Mon Apr 25 10:50:07 2011
    
    __ Key _________________________________________________________________
    Buffer used     1.93M of  16.00M  %Used:  12.09
      Current       4.08M            %Usage:  25.49
    Write hit       0.00%
    Read hit       99.98%
    
    __ Questions ___________________________________________________________
    Total          41.67M   547.2/s
      QC Hits      37.66M   494.5/s  %Total:  90.37
      DMS           3.25M    42.7/s            7.81
      Com_        506.98k     6.7/s            1.22
      COM_QUIT    252.09k     3.3/s            0.60
      -Unknown         17     0.0/s            0.00
    Slow 10 s          81     0.0/s            0.00  %DMS:   0.00  Log: OFF
    DMS             3.25M    42.7/s            7.81
      SELECT        3.22M    42.3/s            7.73         99.01
      UPDATE       32.27k     0.4/s            0.08          0.99
      INSERT            7     0.0/s            0.00          0.00
      DELETE            2     0.0/s            0.00          0.00
      REPLACE           0       0/s            0.00          0.00
    Com_          506.98k     6.7/s            1.22
      set_option  252.63k     3.3/s            0.61
      change_db   251.02k     3.3/s            0.60
      show_variab     842     0.0/s            0.00
    
    __ SELECT and Sort _____________________________________________________
    Scan            2.14M    28.1/s %SELECT:  66.41
    Range          34.27k     0.5/s            1.06
    Full join           0       0/s            0.00
    Range check         0       0/s            0.00
    Full rng join       0       0/s            0.00
    Sort scan     917.81k    12.1/s
    Sort range    405.82k     5.3/s
    Sort mrg pass       0       0/s
    
    __ Query Cache _________________________________________________________
    Memory usage    6.01M of  16.00M  %Used:  37.57
    Block Fragmnt  25.73%
    Hits           37.66M   494.5/s
    Inserts         1.55M    20.3/s
    Insrt:Prune    2.22:1    11.1/s
    Hit:Insert    24.35:1
    
    __ Table Locks _________________________________________________________
    Waited        104.35k     1.4/s  %Total:   3.21
    Immediate       3.15M    41.3/s
    
    __ Tables ______________________________________________________________
    Open               64 of   64    %Cache: 100.00
    Opened          6.12k     0.1/s
    
    __ Connections _________________________________________________________
    Max used           98 of  151      %Max:  64.90
    Total         252.09k     3.3/s
    
    __ Created Temp ________________________________________________________
    Disk table    733.55k     9.6/s
    Table           1.47M    19.3/s    Size:  16.0M
    File                5     0.0/s
    
    __ Threads _____________________________________________________________
    Running            16 of   36
    Cached              2 of    8      %Hit:  94.54
    Created        13.76k     0.2/s
    Slow                0       0/s
    
    __ Aborted _____________________________________________________________
    Clients             0       0/s
    Connects            2     0.0/s
    
    __ Bytes _______________________________________________________________
    Sent          229.43G    3.0M/s
    Received        5.06G   66.4k/s
    
    __ InnoDB Buffer Pool __________________________________________________
    Usage         304.00k of   8.00M  %Used:   3.71
    Read hit       84.42%
    Pages
      Free            493            %Total:  96.29
      Data             19                      3.71 %Drty:   0.00
      Misc              0                      0.00
      Latched                                  0.00
    Reads              77     0.0/s
      From file        12     0.0/s           15.58
      Ahead Rnd         1     0.0/s
      Ahead Sql         0       0/s
    Writes              0       0/s
    Flushes             0       0/s
    Wait Free           0       0/s
    
    __ InnoDB Lock _________________________________________________________
    Waits               0       0/s
    Current             0
    Time acquiring
      Total             0 ms
      Average           0 ms
      Max               0 ms
    
    __ InnoDB Data, Pages, Rows ____________________________________________
    Data
      Reads            25     0.0/s
      Writes            3     0.0/s
      fsync             3     0.0/s
      Pending
        Reads           0
        Writes          0
        fsync           0
    
    Pages
      Created           0       0/s
      Read             19     0.0/s
      Written           0       0/s
    
    Rows
      Deleted           0       0/s
      Inserted          0       0/s
      Read              0       0/s
      Updated           0       0/s
    Code:
     >>  MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    Please enter your MySQL administrative login: root
    Please enter your MySQL administrative password:
    
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.1.49-3
    [OK] Operating on 64-bit architecture
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 25M (Tables: 46)
    [!!] InnoDB is enabled but isn't being used
    [!!] Total fragmented tables: 3
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 21h 3m 23s (41M q [546.646 qps], 250K conn, TX: 228B, RX: 5B)
    [--] Reads / Writes: 99% / 1%
    [--] Total buffers: 58.0M global + 2.7M per thread (151 max threads)
    [OK] Maximum possible memory usage: 463.8M (23% of installed RAM)
    [OK] Slow queries: 0% (80/41M)
    [OK] Highest usage of available connections: 64% (98/151)
    [OK] Key buffer size / total MyISAM indexes: 16.0M/3.5M
    [OK] Key buffer hit rate: 100.0% (77M cached / 15K reads)
    [OK] Query cache efficiency: 92.1% (37M cached / 40M selects)
    [!!] Query cache prunes per day: 791325
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1M sorts)
    [!!] Temporary tables created on disk: 33% (729K on disk / 2M total)
    [OK] Thread cache hit rate: 94% (13K created / 250K connections)
    [!!] Table cache hit rate: 1% (64 open / 5K opened)
    [OK] Open file limit used: 8% (87/1K)
    [OK] Table locks acquired immediately: 96% (3M immediate / 3M locks)
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Add skip-innodb to MySQL configuration to disable InnoDB
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Enable the slow query log to troubleshoot bad queries
        When making adjustments, make tmp_table_size/max_heap_table_size equal
        Reduce your SELECT DISTINCT queries without LIMIT clauses
        Increase table_cache gradually to avoid file descriptor limits
    Variables to adjust:
        query_cache_size (> 16M)
        tmp_table_size (> 16M)
        max_heap_table_size (> 16M)
        table_cache (> 64)
    
    root@vps:~# wget http://hackmysql.com/scripts/mysqlreport
    --2011-04-25 10:48:23--  http://hackmysql.com/scripts/mysqlreport
    Resolving hackmysql.com... 64.13.***.157
    Connecting to hackmysql.com|64.13.***.157|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 38873 (38K) [application/x-perl]
    Saving to: `mysqlreport'
    
    100%[======================================>] 38,873      --.-K/s   in 0.006s
    
    2011-04-25 10:48:24 (6.18 MB/s) - `mysqlreport' saved [38873/38873]

  10. #30
    Tham gia
    22-09-2010
    Bài viết
    454
    Like
    1
    Thanked 8 Times in 8 Posts
    Rất là cảm ơn anh ! Hy vọng trong sẽ có dịp sử dụng những dịch vụ của anh.

    Thì ra là mất cơ bản trầm trọng cái khoản sort này.

    Cho em hỏi thêm 2 câu nữa chắc là đủ dùng :
    Code:
    1. Security: [!!] User '@localhost' has no password set.
    --> Nên buộc tất cả user kết nối mysql phải dùng password
    Em ko biết khắc phục cái này ???... ý nói là nên tạo user chứ đừng dùng tài khoản root ??? Tại lười lấy root dùng luôn cho nhanh.

    2/ Trước giờ toàn dùng lighttpd, giờ tập tành thử Nginx. BÊn nginx có cái module nào tương tự ko? Chỉ em cách dùng với, có search google ra nhưng mà đọc khó hiểu quá... dùng hết sức phức tạp, ngại nên chưa dám dùng.

    server.modules += ( "mod_evasive" )
    evasive.max-conns-per-ip = 4

+ Reply to Thread
Trang 3 / 5 FirstFirst 12345 LastLast

Bookmarks

Quy định

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts