Results 1 to 9 of 9
  1. #1

    Problem with mysql my.cnf

    Wanted to help if is possible for
    Database server mysql. Waste is used as ram.
    mysql (5.0.81-community)
    centos 5.3

    Adjustment for the my.cnf file wanted
    2 gb ram
    core 2 duo cpu
    set-variable = max_connections=500
    socket =/var/lib/mysql/mysql.sock

  2. #2
    Join Date
    Jul 2009
    relaxiha ,

    You mean to say you want to limit Mysql to under 2GB RAM usage ?

  3. #3
    for best configuration ...mysql
    i want configure my.cnf

  4. #4
    Join Date
    Jun 2006
    I'd really recommend doing some research online. It's difficult to know exactly what you need to configure it to. We can make recommendations but ultimately it's up to you to decide what fits best for your usage.
    FiberPeer.Com | | REAL DDoS Protection | Cloud Hosting | VPS | Dedicated Servers | High Bandwidth Hosting | 1Gbps-10Gbps Unmetered
    FiberPeer DDoS Mitigation | ethProxy Upgraded! | 14-Years Experience | Emergency 24/7 Support
    Visit us @

  5. #5
    Join Date
    Nov 2005
    God's Own Country!
    You can download the MySQL tuning primer from , and run it on your server as root.

    It will tell you what ll changes need to be done. Pretty intelligent script!


  6. #6
    Join Date
    Nov 2005
    Tuning primer will allow best configuration for your server based on the previous mysql usage, it won't practically forcefully limit the usage within 2GB/3GB if you want to. You need to calculate the usage if you want to limit the memory usage by the mysql.
    Mellowhost - Providing High Quality Web Hosting Services since 2007
    SSD Cpanel Shared, SSD OpenVZ & KVM VPS Hosting
    A Hosting Provider with Complete SSD VPS & Shared Hosting.

  7. #7
    how big is your website traffic? it's possible that the resource usage is cause by a lot of traffic coming in.

    any way try to run the script to get information about your mysql server from that you can tune it.

    if your traffic is still low, i think max_connections = 500 is to high, you can try to reduce is and try it, if you get connection problem then increase it a little bit step-by-step. Half Dedicated Half Price
    We provide affordable VPS hosting solution Singapore datacenter

  8. #8
    i run it
    please help for configuration

    [~]# ./
                 - By: Matthew Montgomery -
    MySQL Version 5.0.81-community i686
    Uptime = 5 days 11 hrs 9 min 29 sec
    Avg. qps = 25
    Total Questions = 11812181
    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:
    for info about MySQL's Enterprise Monitoring and Advisory Service
    The slow query log is NOT enabled.
    Current long_query_time = 10 sec.
    You have 3 out of 11812202 that take longer than 10 sec. to complete
    Your long_query_time may be too high, I typically set this under 5 sec.
    The binary update log is NOT enabled.
    You will not be able to do point in time recovery
    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
    Current max_connections = 500
    Current threads_connected = 1
    Historic max_used_connections = 15
    The number of used connections is 3% 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
    Max Memory Ever Allocated : 58 M
    Configured Max Per-thread Buffers : 1.31 G
    Configured Max Global Buffers : 17 M
    Configured Max Memory Limit : 1.32 G
    Physical Memory : 1.97 G
    Max memory limit seem to be within acceptable norms
    Current MyISAM index space = 89 M
    Current key_buffer_size = 7 M
    Key cache miss rate is 1 : 362
    Key buffer free ratio = 57 %
    Your key_buffer_size seems to be fine
    Query cache is supported but not enabled
    Perhaps you should set the query_cache_size
    Current sort_buffer_size = 2 M
    Current read_rnd_buffer_size = 256 K
    Sort buffer seems to be fine
    Current join_buffer_size = 132.00 K
    You have had 410333 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.
    Current open_files_limit = 4096 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
    Current table_cache value = 64 tables
    You have a total of 403 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
    Current max_heap_table_size = 16 M
    Current tmp_table_size = 32 M
    Of 488700 temp tables, 8% were created on disk
    Effective in-memory tmp_table_size is limited to max_heap_table_size.
    Created disk tmp tables ratio seems fine
    Current read_buffer_size = 128 K
    Current table scan ratio = 269 : 1
    read_buffer_size seems to be fine
    Current Lock Wait ratio = 1 : 9498
    Your table locking seems to be fine
    Last edited by relaxiha; 09-11-2009 at 10:36 PM.

  9. #9
    Both of these scripts are quite useful for MySQL tuning. Here is some sample output of

     >>  MySQLTuner 1.0.0 - Major Hayden <[email protected]>
     >>  Bug reports, feature requests, and downloads at
     >>  Run with '--help' for additional options and output filtering
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.81-community
    [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: 350M (Tables: 373)
    [--] Data in InnoDB tables: 144K (Tables: 9)
    [--] Data in MEMORY tables: 252K (Tables: 4)
    [!!] Total fragmented tables: 30
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 5d 11h 29m 12s (11M q [24.998 qps], 271K conn, TX: 922M, RX: 2B)
    [--] Reads / Writes: 88% / 12%
    [--] Total buffers: 34.0M global + 2.7M per thread (500 max threads)
    [OK] Maximum possible memory usage: 1.3G (67% of installed RAM)
    [OK] Slow queries: 0% (3/11M)
    [OK] Highest usage of available connections: 3% (15/500)
    [OK] Key buffer size / total MyISAM indexes: 8.0M/89.8M
    [OK] Key buffer hit rate: 99.7% (1B cached / 3M reads)
    [!!] Query cache is disabled
    [OK] Sorts requiring temporary tables: 0% (2K temp sorts / 1M sorts)
    [!!] Joins performed without indexes: 411675
    [OK] Temporary tables created on disk: 8% (44K on disk / 534K total)
    [!!] Thread cache is disabled
    [!!] Table cache hit rate: 0% (64 open / 313K opened)
    [OK] Open file limit used: 2% (116/4K)
    [OK] Table locks acquired immediately: 99% (13M immediate / 13M locks)
    [OK] InnoDB data size / buffer pool: 144.0K/8.0M
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        Enable the slow query log to troubleshoot bad queries
        Adjust your join queries to always utilize indexes
        Set thread_cache_size to 4 as a starting value
        Increase table_cache gradually to avoid file descriptor limits
    Variables to adjust:
        query_cache_size (>= 8M)
        join_buffer_size (> 128.0K, or always use indexes with joins)
        thread_cache_size (start at 4)
        table_cache (> 64)

Similar Threads

  1. Upgrade from MySQL 4 to MySQL 5 - Problem
    By Darkfire001 in forum Hosting Security and Technology
    Replies: 1
    Last Post: 06-03-2008, 09:09 PM
  2. Mysql Problem
    By ctech in forum Programming Discussion
    Replies: 4
    Last Post: 06-06-2004, 07:03 PM
  3. MySQL Problem.
    By bidhata in forum Dedicated Server
    Replies: 6
    Last Post: 05-07-2004, 07:02 PM
  4. Problem with /var/lib/mysql/mysql.sock after MySQL upgrade
    By oldford in forum Dedicated Server
    Replies: 9
    Last Post: 07-30-2003, 11:35 AM
  5. Help! MySQL Connection Problem (mysql.sock)
    By raylin in forum Dedicated Server
    Replies: 3
    Last Post: 04-16-2001, 06:12 PM

Posting Permissions

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