setting server data base mysql

Discussion in 'Masalah Teknik dan Keamanan' started by lopikunik, 16 Apr 2012.

Thread Status:
Not open for further replies.
  1. lopikunik

    lopikunik Beginner 2.0

    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Tolong para bro yang master2x, bagi ilmunya untuk setting my.cnf di server data base mysql.
    Asumsi dengan pengunjung website 50.000 user per hari.

    spesifikasi server :
    prosessor : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    memori : 32 GB
    HDD : 600 GB SAS

    terima kasih.
     
  2. BennyKusman

    BennyKusman Hosting Guru DWH Guardian Web Hosting (Company)

    Messages:
    2,234
    Likes Received:
    239
    Trophy Points:
    63
  3. lopikunik

    lopikunik Beginner 2.0

    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Pernah pake mysqltuner ga banyak membantu bro, thanks tutornya saya coba dulu.

    ini saya lampirkan setting saya sebelumnya, koreksi jika ada yang salah :

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    port = 3306
    tmpdir = /tmp
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0

    skip-external-locking
    skip-name-resolve

    # * Fine Tunning
    key_buffer = 50M
    max_allowed_packet = 32M
    thread_stack = 256K
    thread_cache_size = 32
    sort_buffer_size = 16M
    read_buffer_size = 16M
    read_rnd_buffer_size = 16M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 8M

    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover = BACKUP
    max_connections = 500
    max_connect_errors = 100
    table_cache = 8012
    thread_concurrency = 16
    concurrent_insert = 2

    tmp_table_size = 512M
    max_heap_table_size = 512M

    #
    # * Query Cache Configuration
    #
    query_cache_limit = 128M
    query_cache_size = 8M
    query_cache_type = 2

    #
    # * Access Time
    #
    interactive_timeout = 40
    wait_timeout = 15
    connect_timeout = 30

    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file = /var/log/mysql/mysql.log
    #general_log = 1

    #log_error = /var/log/mysql/error.log

    # Here you can see queries with especially long duration
    #log_slow_queries = /var/log/mysql/mysql-slow.log
    #long_query_time = 5
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # other settings you may need to change.
    #server-id = 1
    log_bin = /var/log/mysql/mysql-bin.log
    expire_logs_days = 30
    max_binlog_size = 200M
    #binlog_do_db = include_database_name
    #binlog_ignore_db = include_database_name

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

    terima kasih.

     
  4. BennyKusman

    BennyKusman Hosting Guru DWH Guardian Web Hosting (Company)

    Messages:
    2,234
    Likes Received:
    239
    Trophy Points:
    63
    dengan memori 32GB, saya rasa value ini bisa dinaikan:
    biasa saya rubah value, trus pake mysqltuner liat hasilnya.. ditunggu beberapa hari dan rubah lagi.. untuk exact value, susah jg diberikan.. mungkin untuk awal bisa dikali 2 dari original value
     
  5. lopikunik

    lopikunik Beginner 2.0

    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Thanks ya mas bro, saya cobanya dulu.
     
  6. twistedshells

    twistedshells Apprentice 1.0

    Messages:
    277
    Likes Received:
    18
    Trophy Points:
    18
    Dengan spesifikasi diatas semestinya dengan nilai default tidak ada masalah untuk pengunjung 50.000/hari ~ 2100 user/jam ~ kurang dari 1 user/detik ;)

    Memangnya sekarang yang dirasakan apa? lambatkah ? front end nya menggunakan apa ? web application ?
     
  7. lopikunik

    lopikunik Beginner 2.0

    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    iya mas bro lambat, padahal di web servernya udah kubikin maksimal untuk MaxClients dan ServerLimit.
    maksud dari front end nya menggunakan apa ? web application ? itu apa yah?
     
  8. BennyKusman

    BennyKusman Hosting Guru DWH Guardian Web Hosting (Company)

    Messages:
    2,234
    Likes Received:
    239
    Trophy Points:
    63
    apa lambatnya gara2 mysql ? atau yang lain ? kalau top processnya, proses apa yang consume cpu/memori banyak ?
    mungkin coba install nginx atau varnish aja dulu.. mungkin mungkin bisa membantu..
     
  9. twistedshells

    twistedshells Apprentice 1.0

    Messages:
    277
    Likes Received:
    18
    Trophy Points:
    18
    @TS: maksudnya front end itu, apakah berbasis web ? atau aplikasi client - server ? Sebagai contoh forum dan web application dengan back end db server mysql/postgresql maka front end nya disebut web based application.

    Coba dicek konfigurasi web servernya, atau sekalian copy paste hasil command berikut:

    sar 5 5

    dan perintah berikut:

    top -n 1
     
  10. 1stserver

    1stserver Hosting Guru Web Hosting

    Messages:
    1,801
    Likes Received:
    174
    Trophy Points:
    63
    coba cek juga #iostat
    kalau %iowait > 2 mungkin masalah di Harddisk-nya boz
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...