Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-10-2010, 09:16 AM
|
#1
|
LQ Newbie
Registered: Jun 2009
Posts: 10
Rep:
|
MySQL rapitly getting slower
Our MySQL 5.0.51a running on Debian Lenny is going slow a few minutes after start. There is no sign of taking a lot of resources, "top" says less than 10% cpu and less than 10% MEM.
As for now the mysqld is restarted every 7 minutes...
During startup syslog says
"InnoDB: HugeTLB: Warning: Failed to allocate 8404992 bytes. errno 12"
php-cgi segfaults just after restart and
"WordPress database error MySQL server has gone away for query" as expected(?) (there is no db for a few seconds)
The database is 700 Mb, 3300 tables and running Wordpress. mysql and php runs of different machines.
Please help!
|
|
|
11-10-2010, 09:26 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,824
|
Quote:
Originally Posted by MattiasKilbo
Our MySQL 5.0.51a running on Debian Lenny is going slow a few minutes after start. There is no sign of taking a lot of resources, "top" says less than 10% cpu and less than 10% MEM.
As for now the mysqld is restarted every 7 minutes...
During startup syslog says
"InnoDB: HugeTLB: Warning: Failed to allocate 8404992 bytes. errno 12"
php-cgi segfaults just after restart and "WordPress database error MySQL server has gone away for query" as expected(?) (there is no db for a few seconds)
The database is 700 Mb, 3300 tables and running Wordpress. mysql and php runs of different machines.
|
Well, there's not alot we can help you with, since there's not enough details. How much memory is on the machine? CPU? 3300 tables is a bit high, but how many transactions/users are running through this DB?
And did you try to look up the error you're getting????
http://forums.mysql.com/read.php?24,196455,196476
You're going to have to modify things to use huge pages.
|
|
|
11-10-2010, 10:02 AM
|
#3
|
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
|
There are 2 cpus with 2 cores each and 8 Gb memory.
I do not know the exact number of transactions/users, but max ~ 30 pageview / minute.
The server should have no problem with this.
Cpu(s): 0.8%us, 0.2%sy, 0.0%ni, 98.8%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 9169304k total, 5824604k used, 3344700k free, 50844k buffers
Swap: 2650684k total, 0k used, 2650684k free, 856628k cached
Yes I have read that thread and followed the guide here:
http://www.cyberciti.biz/tips/linux-...rformance.html
cat /proc/meminfo | grep Huge
HugePages_Total: 40
HugePages_Free: 40
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Looks like mySQL is not using any of it (HugePages_Free: 40)
|
|
|
11-10-2010, 10:18 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,824
|
Quote:
Originally Posted by MattiasKilbo
There are 2 cpus with 2 cores each and 8 Gb memory. I do not know the exact number of transactions/users, but max ~ 30 pageview / minute. The server should have no problem with this.
Cpu(s): 0.8%us, 0.2%sy, 0.0%ni, 98.8%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 9169304k total, 5824604k used, 3344700k free, 50844k buffers
Swap: 2650684k total, 0k used, 2650684k free, 856628k cached
Yes I have read that thread and followed the guide here:
http://www.cyberciti.biz/tips/linux-...rformance.html
cat /proc/meminfo | grep Huge
HugePages_Total: 40
HugePages_Free: 40
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Looks like mySQL is not using any of it (HugePages_Free: 40)
|
Well, if it's not using it, then there's obviously some part of the configuration that was missed. The link to the MySQL forums page had troubleshooting info on it, since it dealt with that topic specifically.
|
|
|
11-10-2010, 11:48 AM
|
#5
|
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
|
It seems like I placed "ulimit -l unlimited" at the wrong place.
It is now in the mysql initscript
Almost, there
"InnoDB: HugeTLB: Warning: Failed to allocate 8404992 bytes. errno 12" is gone but
"Warning: Failed to allocate 952107008 bytes from HugeTLB memory. errno 12"
So it can allocate 8 404 992 bytes but not 952 107 008
|
|
|
11-11-2010, 11:49 AM
|
#6
|
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
|
It turns out that
HugePages_Total: 40
Hugepagesize: 2048 kB
40 * 2048 k > 8404992
but
40 * 2048 k < 952107008
So to summarize, for those with the same problem:
Follow the guide here
http://www.cyberciti.biz/tips/linux-...rformance.html
change
vm.nr_hugepages= X
where X should be more than
Failed to allocate 952107008 bytes / Hugepagesize / 1000
and X * 2048 k should be less than your mem.
Add
ulimit -l unlimited
to mysql initscript
run sysctl -p
restart mysql
|
|
|
All times are GMT -5. The time now is 04:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|