I tried using my-small.cnf that's provided in the Debian config examples. According to the commenting it's designed for servers with less than 64MB of RAM so this should be keeping my memory usage down. Unfortunately it's not working. After a while my MySQL server still gets up to a couple hundred MB and I have to restart it. Here's what my modified my.cnf looks like after merging it with the default my.cnf provided for the private MySQL instances:
When I uncomment the innodb lines MySQL fails to start with the following error:
I'm afraid since my database tables are InnoDB (default in 5.5) that without this InnoDB-specific config entries the server isn't optimized. How can I modify my MySQL server config to limit its memory usage? I'm running a low traffic XenForo forum so it shouldn't need much. asked 11 Sep '13, 21:27 HittingSmoke |
You can fix the InnoDB error by setting Regarding the memory issue, the config file provided by Debian states that it is for applications "where MySQL is only used from time to time". There's no guarantee that you're going to see low memory usage with that configuration when you're running it constantly. If you don't have a pressing need to run a private MySQL instance for your low-traffic forum, then I recommend that you simply use our shared MySQL service instead, since that won't count towards your memory usage. answered 12 Sep '13, 14:01 seanf I don't think I'm understanding this file size parameter. I guess I need to read up on it more. I'm working on a bit of a project here involving intense optimization to get the snappiest forum I can. I plan on benchmarking between the private MySQL instance and the shared when I get all of my configuration in order. Now that the server is starting with the InnoDB setting in effect the memory usage seems much more under control.
(12 Sep '13, 14:18)
HittingSmoke
There's not much to understand. The configuration specifies the size of the file. You had an existing file that didn't match that size.
(12 Sep '13, 14:23)
seanf
What I don't understand is how the log file has a predetermined size. Wouldn't the log file get bigger and smaller as it's populated and pruned?
(12 Sep '13, 17:40)
HittingSmoke
No - the file is created at the size specified in your configuration, and when it needs more space a new file is created at the same size, and named incrementally, eg:
As far as I know, it never shrinks. If you want a database server capable of cleaning up after itself, then you should use PostgreSQL :)
(12 Sep '13, 17:54)
seanf
That makes much more sense, thanks. Unfortunately the products I'm working with don't support PostgreSQL. Trust me when I say I'm never happy about using Orcale anything.
(12 Sep '13, 17:58)
HittingSmoke
|