ncatanchin
asked on
Setting ulimit for MySQL - Red Hat
Hello,
I have the duty of installing a large PHP / MySQL application on a Red Hat server. I've almost finished, but the data to be imported is very large - and still growing. Part of the documentation told me to:
Launch the MySQL daemon with the following options:
ulimit diskspace>3GB memory>high
option --max_allowed_packet=160M
I have set the max allowed packet size successfully in my.cnf, but I do not know how to go about setting the ulimit as suggested. Please provide help regarding what file needs to be edited, and the command to be inserted. The table keeps growing (over 1.5 GB now) and I don't know what may happen if we get over 3 GB. MySQL version 4.1.20.
Thanks a lot
I have the duty of installing a large PHP / MySQL application on a Red Hat server. I've almost finished, but the data to be imported is very large - and still growing. Part of the documentation told me to:
Launch the MySQL daemon with the following options:
ulimit diskspace>3GB memory>high
option --max_allowed_packet=160M
I have set the max allowed packet size successfully in my.cnf, but I do not know how to go about setting the ulimit as suggested. Please provide help regarding what file needs to be edited, and the command to be inserted. The table keeps growing (over 1.5 GB now) and I don't know what may happen if we get over 3 GB. MySQL version 4.1.20.
Thanks a lot
Hi ncatanchin,
Step by step. :)
Have you (or any other admin) set up user quotas on any of the file systems? If not, great. It's pretty easy to check by looking in the file /etc/fstab. For each file system you should see something that looks like this:
LABEL=/home /home ext3 defaults 1 2
If you see something like this:
LABEL=/home /home ext3 defaults,usrquota 1 2
someone has attempted (or succeeded) in configuring user quotas. You'll have to use the quota tools to undo the effects of the quota.
I'm not aware of a 3GB limit on anything. There are potentially 2GB issues (but that probably involves systems older than yours) and 4GB issues. There is a 4GB issue with the MyISAM engine in MySQL 4.x. Here's a link with a good description of the problem and a solution. (If you're using the InnoDB engine, there is no problem at 4GB.)
http://jeremy.zawodny.com/blog/archives/000796.html
Good Luck,
Kent
Step by step. :)
Have you (or any other admin) set up user quotas on any of the file systems? If not, great. It's pretty easy to check by looking in the file /etc/fstab. For each file system you should see something that looks like this:
LABEL=/home /home ext3 defaults 1 2
If you see something like this:
LABEL=/home /home ext3 defaults,usrquota 1 2
someone has attempted (or succeeded) in configuring user quotas. You'll have to use the quota tools to undo the effects of the quota.
I'm not aware of a 3GB limit on anything. There are potentially 2GB issues (but that probably involves systems older than yours) and 4GB issues. There is a 4GB issue with the MyISAM engine in MySQL 4.x. Here's a link with a good description of the problem and a solution. (If you're using the InnoDB engine, there is no problem at 4GB.)
http://jeremy.zawodny.com/blog/archives/000796.html
Good Luck,
Kent
ASKER
Thanks for the help guys, I'm still unsure of what to do:
ulimit diskspace>3GB memory>high
This is the command I am concerned about. I opened the mysqld_safe and found several instances of the use of ulimit. I tried to enter "ulimit diskspace>3GB memory>high" at the shell and the command is not valid. Looking at the man page, I find I can set such things as maximum size of core files created, maximum size of files created by the shell..
Question:
What did the original developer who created the documentation mean by specifying: launch mysql with the above command? Do I need two separate ulimit commands to take care of this requirement? Is 'diskspace' equivalent to, for example, setting '-c The maximum size of core files created'? How do I set a memory value of 'high'?
Thanks again
ulimit diskspace>3GB memory>high
This is the command I am concerned about. I opened the mysqld_safe and found several instances of the use of ulimit. I tried to enter "ulimit diskspace>3GB memory>high" at the shell and the command is not valid. Looking at the man page, I find I can set such things as maximum size of core files created, maximum size of files created by the shell..
Question:
What did the original developer who created the documentation mean by specifying: launch mysql with the above command? Do I need two separate ulimit commands to take care of this requirement? Is 'diskspace' equivalent to, for example, setting '-c The maximum size of core files created'? How do I set a memory value of 'high'?
Thanks again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you leannonn. They were both already set to unlimited, how funny.
Thank you also Kdo.
Thank you also Kdo.
As for the size over 3GB, that's exactly what you're specifying. Please note that the max size of the chunk (single import command) is limitted by the max allowed packet size.