Re: Memory usage for MySQL

2006-07-23 Thread Vinicius Vianna
From what I read you should only change kern.maxdsiz, changing 
kern.dfldsiz makes every process allocating this amount of memory by 
default, thats bad.


Something like:

kern.maxdsiz="1395864371" # 1.3GB
#kern.dfldsiz="1395864371" # 1.3GB
#kern.maxssiz="134217728" # 128MB

would do the trick for you, check limits also and see what the init 
scripts may be limiting on this process.


HTH,
DS

Thaddeus Quintin wrote:
I'm working on a FreeBSD 6.1 machine and setting up MySQL 5.0 with 
some InnoDB tables.


The machine has 2GB of RAM and will primarily be used as a database 
machine and will also be serving files over NFS (not high volume).


The issue that I'm having is that when I start up MySQL I get a couple 
"Out of Memory" errors before it actually starts up.  Looks like this-


060719 11:55:35  InnoDB: Started; log sequence number 0 43656
/usr/local/libexec/mysqld: Out of memory (Needed 950109184 bytes)
/usr/local/libexec/mysqld: Out of memory (Needed 712581120 bytes)
060719 11:55:35 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.22-log'  socket: '/tmp/mysql.sock'  port: 3306

If I reduce or increase the innodb_buffer_pool_size variable for MySQL 
I can eliminate or increase the number of errors.  This set of errors 
was with innodb_buffer_pool_size set to 600M


This is what top currently shows for MySQL-
  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
  871 mysql   8  200  1196M   159M kserel 0   0:01  0.00% mysqld

I tweaked /boot/loader.conf to allow larger data size for processes 
already (rebooted after changes)-

kern.maxdsiz="1395864371" # 1.3GB
kern.dfldsiz="1395864371" # 1.3GB
kern.maxssiz="134217728" # 128MB

If there's an out of memory error, how come MySQL starts up?  Is this 
something to be concerned about?  What else should I be checking to 
figure this out?


Thanks-
Thaddeus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Memory usage for MySQL

2006-07-19 Thread Charles Swiger

On Jul 19, 2006, at 2:51 PM, Thaddeus Quintin wrote:

Or maybe it's trying to ask for a big shared memory segment...?
Your guess is as good as mine.  Are there tools or anything else I  
can use to try and figure this out?


MySQL probably has some documentation which would help, although if  
you wait a bit, perhaps Greg Lehey or someone more familiar with MySQL 
+FreeBSD will chime in... :-)


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Memory usage for MySQL

2006-07-19 Thread Thaddeus Quintin

On Jul 19, 2006, at 2:37 PM, Charles Swiger wrote:

On Jul 19, 2006, at 2:31 PM, Thaddeus Quintin wrote:

I already took care of that, it was in my first email-
I tweaked /boot/loader.conf to allow larger data size for  
processes already (rebooted after changes)-

kern.maxdsiz="1395864371" # 1.3GB
kern.dfldsiz="1395864371" # 1.3GB
kern.maxssiz="134217728" # 128MB


From what I read, that should do it, but I still get those start  
up errors before MySQL decides to run.  Maybe it has something to  
do with how quickly MySQL is asking for memory?


Or maybe it's trying to ask for a big shared memory segment...?
Your guess is as good as mine.  Are there tools or anything else I  
can use to try and figure this out?


Thaddeus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Memory usage for MySQL

2006-07-19 Thread Charles Swiger

On Jul 19, 2006, at 2:31 PM, Thaddeus Quintin wrote:

I already took care of that, it was in my first email-
I tweaked /boot/loader.conf to allow larger data size for  
processes already (rebooted after changes)-

kern.maxdsiz="1395864371" # 1.3GB
kern.dfldsiz="1395864371" # 1.3GB
kern.maxssiz="134217728" # 128MB


From what I read, that should do it, but I still get those start up  
errors before MySQL decides to run.  Maybe it has something to do  
with how quickly MySQL is asking for memory?


Or maybe it's trying to ask for a big shared memory segment...?

--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Memory usage for MySQL

2006-07-19 Thread Thaddeus Quintin

On Jul 19, 2006, at 1:38 PM, Charles Swiger wrote:
FreeBSD defaults to having a 512MB maximum process datasize.  Add  
something like:


kern.dfldsiz="1G"

...to /boot/loader.conf.


I already took care of that, it was in my first email-
I tweaked /boot/loader.conf to allow larger data size for  
processes already (rebooted after changes)-

kern.maxdsiz="1395864371" # 1.3GB
kern.dfldsiz="1395864371" # 1.3GB
kern.maxssiz="134217728" # 128MB


From what I read, that should do it, but I still get those start up  
errors before MySQL decides to run.  Maybe it has something to do  
with how quickly MySQL is asking for memory?


Thaddeus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Memory usage for MySQL

2006-07-19 Thread Charles Swiger

On Jul 19, 2006, at 1:14 PM, Thaddeus Quintin wrote:
The issue that I'm having is that when I start up MySQL I get a  
couple "Out of Memory" errors before it actually starts up.  Looks  
like this-


060719 11:55:35  InnoDB: Started; log sequence number 0 43656
/usr/local/libexec/mysqld: Out of memory (Needed 950109184 bytes)
/usr/local/libexec/mysqld: Out of memory (Needed 712581120 bytes)
060719 11:55:35 [Note] /usr/local/libexec/mysqld: ready for  
connections.

Version: '5.0.22-log'  socket: '/tmp/mysql.sock'  port: 3306


FreeBSD defaults to having a 512MB maximum process datasize.  Add  
something like:


kern.dfldsiz="1G"

...to /boot/loader.conf.

--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"