The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MYSQL conf

Discussion in 'General Discussion' started by jaymc, Jan 10, 2008.

  1. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I am in the process of re tweaking my mysql conf

    Rather than ask a specific question firsrt, I just want to get a general idea of what to indentify a problem

    For example, I read that:

    query_cache_size= 32MB for every 1GB of RAM

    Now, if I have 3GB of RAM, that would mean 96MB right?

    I actually have it set to 512MB. I have never reverted back, due to the fact I never go into SWAP. With this said, if there is no swap, increasing to 512 is not causing a problem thus can only be better than having it set to 96MB

    Or am I missing something?

    Same applies for

    key_buffer = 128MB for every 1GB of RAM


    I read that those 2 our really important, so again I have assigned 956MB to the key buffer and still the memory threshold seems to cope as I never go into swap


    Is this a good way to go about it, or will this cause problems. When my site gets busy, problems are popping up.

    Should I revise my my.cnf methods or is swap = 10k a reason to turn a blind eye to the points I have mentioned above

    THANKS!
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If your caches are too large, then it will take an abnormally long time for the data in them to expire. This means SQL statements will produce incorrect results.
     
  3. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    A side from incorrect data being given, could it have a reverse effect having cache so large?
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What do you mean by "reverse effect" ?
     
  5. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Where as typically the more memory you can give to something

    But, giving to much may effect other features or services

    I mean, at the moment there is no swap, so Im not running out, but is it causing secret problems that arnt blatantly obvious
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If you are asking:

    The answer is: it depends.

    It depends upon typicall system load, amount of RAM total in the server, which Operating System is used, which kernel is used, other processes running, etc.

    By configuring the caches to be overly large, MySQL is also put under extra burden as it must track the data in the cache, which adds to its own management overhead.
     
  7. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Cool, I have heard it isnt too good anyway

    I think I might cut it to 256 MB
     
Loading...

Share This Page