MySQL and default memory limits (mysqld: Out of memory)
Chuck Swiger
cswiger at mac.com
Mon Jul 10 18:06:33 UTC 2006
Mike Jakubik wrote:
> Chuck Swiger wrote:
>> 512MB is more than enough for almost all processes to run just fine,
>> and is only really inappropriate for the case where you've got 1-plus
>> GB of physical RAM and want to dedicate the system to a single large
>> task, or perhaps a single-digit number of processes if you've got
>> several GB of physical RAM.
>
> Such as a database server.
Yes, exactly. :-)
Database servers are a rather specialized role which differs in tuning
requirements from normal "general purpose"/"interactive use" workloads
substantially, and it is common for databases to work much better after the
system has been tuned appropriately.
This is partially because many databases want to do their own filesystem
management and control their own VM/paging behavior, which are uncommon
requirements.
> I just think it would be nicer if this limit
> was dynamically set, based on your configuration. Just like MAXUSERS was
> a kernel variable, it is now dynamically set based on your resources.
Yes, well, autotuning is nice but sometimes there isn't an "obviously correct
value" for this limit which is appropriate for all circumstances.
Anyone doing virtual hosting needs to keep this kind of thing under tighter
control, for example. Setting the value lower is beneficial for some cases
because it prevents memory leaks in C code or the system libraries, or bloated
Java VM's, etc, from stealing too many resources from other processes.
--
-Chuck
More information about the freebsd-stable
mailing list