InnoDB memory usage clarification

2005-04-27 Thread Mayuran Yogarajah
The following are from the InnoDB configuration page:
# Set buffer pool size to 50-80% of your computer's memory,
# but make sure on Linux x86 total memory usage is  2GB
*Warning:* On 32-bit GNU/Linux x86, you must be careful not to set 
memory usage too high. |
glibc| may allow the process heap to grow over thread stacks, which 
crashes your server.

Can someone please explain what this means.  We have a 32bit Linux x86 
server with 16gigs of
ram.  Because it is 32bit and not 64bit we cant really make much use of 
all the ram.  I am wondering
which values I can safely increase without crashing the server. Here are 
some of the parameters we are
using in our conf file:

thread_concurrency = 16
table_cache = 512
innodb_buffer_pool_size = 1000M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
From SHOW INNODB STATUS:
BUFFER POOL AND MEMORY
--
Total memory allocated 462835472; in additional pool allocated 3569664
Buffer pool size   24576
Free buffers   0
Database pages 23956
Modified db pages  11531
Free buffers is 0. 

Someone mentioned that because its a quad xeon each CPU would have 2gigs 
of ram to work with.  Does this
mean that I can set the innodb buffer pool much higher ?

any feedback is welcome.
thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: InnoDB memory usage clarification

2005-04-27 Thread David Griffiths
Mayuran,
It depends on a bunch of things. What else is running on this server? 
Does the distro you use have the ability to take advantage of all 16 gig 
(ie if you have apache running, will it be stuck in the same 4 gig as 
MySQL, or can it use the memory above the 4 gig limit).

How big is your database? The innodb_buffer_pool_size holds data from 
your database in memory; if you run a query, and the data is in the 
buffer_pool, the query returns very quickly. If it is not in the 
buffer_pool, then MySQL/InnoDB has to go to disk to get the data. If 
your database is 100 megabytes, there is not much sense in setting a 
buffer_pool of 1 gigabyte. If your database is 10 gigabytes, then you 
will probably encounter some slowness as the disk is being accessed.

How many users will connect? Each user requires some memory for the 
connection, for sorting, etc, etc.

The following equation gives you an idea of how much memory MySQL will 
consume, based on various parameters:

innodb_buffer_pool_size + key_buffer + max_connections * (sort_buffer + 
record_buffer) + max_connections * 2 MB
If you try to grab too much, mysql will crash. Check your distribution 
to figure out what the max process size is.

David
Mayuran Yogarajah wrote:
The following are from the InnoDB configuration page:
# Set buffer pool size to 50-80% of your computer's memory,
# but make sure on Linux x86 total memory usage is  2GB
*Warning:* On 32-bit GNU/Linux x86, you must be careful not to set 
memory usage too high. |
glibc| may allow the process heap to grow over thread stacks, which 
crashes your server.

Can someone please explain what this means.  We have a 32bit Linux x86 
server with 16gigs of
ram.  Because it is 32bit and not 64bit we cant really make much use 
of all the ram.  I am wondering
which values I can safely increase without crashing the server. Here 
are some of the parameters we are
using in our conf file:

thread_concurrency = 16
table_cache = 512
innodb_buffer_pool_size = 1000M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
From SHOW INNODB STATUS:
BUFFER POOL AND MEMORY
--
Total memory allocated 462835472; in additional pool allocated 3569664
Buffer pool size   24576
Free buffers   0
Database pages 23956
Modified db pages  11531
Free buffers is 0.
Someone mentioned that because its a quad xeon each CPU would have 
2gigs of ram to work with.  Does this
mean that I can set the innodb buffer pool much higher ?

any feedback is welcome.
thanks.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]