4 messages in com.mysql.lists.mysqlRe: powers of two in my.cnf ?| From | Sent On | Attachments |
|---|---|---|
| matthew mcglynn | 01 Apr 1999 21:29 | |
| Michael Widenius | 02 Apr 1999 03:07 | |
| jkr...@murl.com | 02 Apr 1999 08:49 | |
| Sasha Pachev | 02 Apr 1999 09:17 |
| Subject: | Re: powers of two in my.cnf ?![]() |
|---|---|
| From: | Sasha Pachev (sas...@direct1.com) |
| Date: | 04/02/1999 09:17:28 AM |
| List: | com.mysql.lists.mysql |
Michael Widenius wrote:
"matthew" == matthew mcglynn <mcgl...@netjet.com> writes:
matthew> This is probably a really dumb question...
matthew> Every example of buffer settings I've seen matthew> has used powers of two. For example, from the matthew> sample configuration file: matthew> set-variable = key_buffer=16M matthew> set-variable = max_allowed_packet=1M matthew> set-variable = thread_stack=128K matthew> set-variable = max_allowed_packet=16M matthew> set-variable = keybuffer=16M
matthew> Similarly, the default table_cache is 64, and when matthew> people ask on this list about running out of file matthew> descriptors, the response is usually "set table_cache matthew> to 32".
matthew> My dumb question is: do these have to all be powers of two ?!
matthew> If for my application, a table_cache of 128 is insufficient, matthew> can I bump it to 150 or do I need to go all the way to 256 ?
Hi!
I just prefer to use powers as two as this gives you the best memory utilization with many memory allocation packages!
You don't however have to use powers of two; For the table cache 150 should be fine!
Regards, Monty
And to add to what Monty has said, powers of 2 are "holy" numbers for a programmer, just like powers of 10 are "holy" for non-programmers.
-- Sasha Pachev http://www.sashanet.com/ (home) http://www.direct1.com/ (work)




