Re: FreeBSD and MySQL - mysqld eats CPU alive
> I've experienced this exact problem, all the way from 4.4-STABLE as well. > The time period where the issue starts happening is very erradic, but I'm > having the exact issue on one of my servers at this very moment. I thought > it was just an issue with my box, and not anyone elses. I've seen this on two machines (both 5.2). When I built mysql with linuxthreads the problem went away. Alternatively I've seen talk of name resolution causing problems due to a non-thread-safe implementation of gethostbyname() - this too manifested itself as abnormal CPU usage. In my case --skip-name-resolve didn't help, but perhaps it might for you guys. -- / Peter Schuller, InfiDyne Technologies HB PGP userID: 0xE9758B7D or 'Peter Schuller <[EMAIL PROTECTED]>' Key retrieval: Send an E-Mail to [EMAIL PROTECTED] E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
On Sat, 31 Jul 2004, adp wrote: > I recently posted the following message to MySQL discussion list. The > response there, and the one I keep finding on Google, is that this is a > long-standing issue betweeen FreeBSD and MySQL. For me this has been > happening since FreeBSD 4.4. I had that problem a couple of years ago and resolved it on a box that's still in use. Very heavily loaded machine, 15 GB database, over 300 million rows in one table. I couldn't find notes on it, however, and don't recall exactly what it was. One thing it might have been - did you change the HZ value in your kernel conf file, perhaps for device polling? I ran into problems on this machine when setting HZ above 500 but don't recall for sure it was mysql problems. I'm happy to share the mysql build and conf files, and the kernel conf file if you think it would help. I think it was a kernel tweak that solved the problem. HTH, --- David ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Solution: FreeBSD and MySQL - mysqld eats CPU alive
On Mon, 2 Aug 2004, Martin Blapp wrote: > > Hi all, > > We have many Mysql's running here, and just to tell you, there > are fixes/workarounds for the behaviour you see: > > FreeBSD 4.8 / 4.9 / 4.10 : > -- > > Compile port with WITH_LINUXTHREADS=YES or remove tcpwrappers > support manually from the build if it hangs with libc_r. Use IP adresses for > master/slave configurations in my.cnf. On problem here is that getnamebyhost() > is not threadsafe. This produces the strange errors you see. Isn't tcpwrappers support broken due to gcc compile options? Or was that only in -current? -- Dan Eischen ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Solution: FreeBSD and MySQL - mysqld eats CPU alive
Hi all, We have many Mysql's running here, and just to tell you, there are fixes/workarounds for the behaviour you see: FreeBSD 4.8 / 4.9 / 4.10 : -- Compile port with WITH_LINUXTHREADS=YES or remove tcpwrappers support manually from the build if it hangs with libc_r. Use IP adresses for master/slave configurations in my.cnf. On problem here is that getnamebyhost() is not threadsafe. This produces the strange errors you see. We run all mysqld without tcpwrappers support and do not have any hangs anymore. FreeBSD 5.2.1 - You have to use libc_r.so libpthreads.so hangs occasionally FreeBSD Current --- You can use libpthrads.so or libc_r.so Martin Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> -- ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 PGP: PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
On Sat, Jul 31, 2004 at 10:08:32PM -0500, adp wrote: > I recently posted the following message to MySQL discussion list. The > response there, and the one I keep finding on Google, is that this is a > long-standing issue betweeen FreeBSD and MySQL. For me this has been > happening since FreeBSD 4.4. > > I have one site where we are going to have to move to Linux. I would much > prefer keeping us on FreeBSD, but we just can't afford the downtime anymore. > Another site is looking at moving to PostgreSQL on FreeBSD. That's too bad. MySQL can run quite well on FreeBSD. > I have several MySQL and FreeBSD installs across a few different sites, and > I consistently have problems with mysqld. It will begin to eat up all of the > CPU and eventually become unresponsive (or the machine will just burn). I > can't seem to manually reproduce this, but given enough time a FreeBSD box > with mysqld will go down. Yes, it's FreeBSD's broken DNS libraries. Add skip-name-resolve to your my.cnf and the problem will probably go away. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo MySQL Geek Desk: (408) 349-7878 Cell: (408) 685-5936 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
On Saturday 31 July 2004 21:08, adp wrote: > I recently posted the following message to MySQL discussion list. The > response there, and the one I keep finding on Google, is that this is a > long-standing issue betweeen FreeBSD and MySQL. For me this has been > happening since FreeBSD 4.4. I don't have any additional info about the problem, but as you say it does seem to be a long-standing issue. The hosting company I use (johncompanies.com -- highly recommended) has a "nanny" script that you may find useful: http://www.johncompanies.com/collocation/knowledge/freebsd_mysqld_nanny.txt HTH, JN ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
On Sat, Jul 31, 2004 at 10:08:32PM -0500, adp wrote: > Any help on this? Googling shows a long history of people having these > problems but no solutions. Please don't give me a URL to a Google showing > others having this problem--I've seen that and more. I want to know if there > is a solution. Any help is appreciated! When this happens are you able to attach truss or gdb to the process? This is impossible to diagnosis without some kind of debugging information. Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: summer is slowly losing its grip ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
Hello, I've experienced this exact problem, all the way from 4.4-STABLE as well. The time period where the issue starts happening is very erradic, but I'm having the exact issue on one of my servers at this very moment. I thought it was just an issue with my box, and not anyone elses. mysql237 93.9 3.4 59336 17460 con- R21Jul04 2797:08.26 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysql --use r=mysql --pid-file= The box isn't exactly heavily loaded, with may 10 QPS; so I don't think it has to do anything with load. Currently I'm running mysql-server-4.0.17 on FreeBSD 4.10-STABLE. FreeBSD x.x 4.10-STABLE FreeBSD 4.10-STABLE #2: Wed Jul 21 18:31:49 PDT 2004 [EMAIL PROTECTED]:/usr/src/sys/compile/PSYCHO i386 --Peter - Original Message - From: "adp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, July 31, 2004 8:08 PM Subject: FreeBSD and MySQL - mysqld eats CPU alive > > Anyone experienced this problem? Is it mysqld or FreeBSD? I can't pinpoint > the exact issue. > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MySQL - mysqld eats CPU alive
On Sun, 2004-08-01 at 04:08, adp wrote: > FreeBSD 4.4, 4.7, 4.9, 4.10 > MySQL 3.x and 4.x > Typical load: 50 qps > With and without replication enabled. > Some sites are SELECT heavy, some are INSERT heavy. > > For one site I think we will be moving from FreeBSD to Linux for the MySQL > servers since MySQL seems to run like a champ on Linux. We will continue to > use FreeBSD for everything else. > > Anyone experienced this problem? Is it mysqld or FreeBSD? I can't pinpoint > the exact issue. We've got MySQL running on several FreeBSD servers here, some doing 100 qps+, and have had no problems what so ever. We've been using MySQL 3 and 4 on FreeBSD since FreeBSD 4.5 upwards. Here is an example status output from one of our servers: # /usr/local/mysql/bin/mysqladmin -u root -p status Enter password: Uptime: 1271242 Threads: 8 Questions: 76203621 Slow queries: 370 Opens: 2461857 Flush tables: 2 Open tables: 511 Queries per second avg: 59.944 You haven't mentioned the source of your MySQL installs. Are you using MySQL from ports, packages, or a binary or source distribution from the MySQL website? We compile MySQL from source using the following: setenv CFLAGS "-O3 -mpentiumpro" setenv CXX gcc setenv CXXFLAGS "-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti -DEAPI" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/var --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler You also haven't mentioned specifically what happens when there is a problem.. You say the machine becomes unresponsive.. what happens if the queries die down, does the box become responsive again? The only thing I can think of causing this is if queries start to come in faster than the box can process - they will build up and up until the machine, as you say, becomes unresponsive. This would indicate some form of bottleneck somewhere. Monitoring the output of "systat -vmstat" might give some clues as to whats going on. I would certainly investigate the cause of this before abandoning FreeBSD. Any threads on google relating to FreeBSD and MySQL not working together are vastly inaccurate or out of date. There are some performance issues with MySQL on FreeBSD 4 with regards to threading. Try using MySQL linked against LinuxThreads, which should give a performance boost. You can specify -DWITH_LINUXTHREADS when installing from ports. We have a test box running FreeBSD 5.2.1 with MySQL 4, linked against the new kse threading library, which should in theory provide performance comparable/superior to MySQL on a linux box. This box has been completely stable - no MySQL or FreeBSD lockups or crashes. Given that 5.3 and -STABLE are due out soon, it might be worth waiting for those, rather than switching to Linux. However we, and many many other people, run high load MySQL installations on FreeBSD without problem, so I would say your problems are specific to your setup, and not something that is a widespread issue. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
FreeBSD and MySQL - mysqld eats CPU alive
I recently posted the following message to MySQL discussion list. The response there, and the one I keep finding on Google, is that this is a long-standing issue betweeen FreeBSD and MySQL. For me this has been happening since FreeBSD 4.4. I have one site where we are going to have to move to Linux. I would much prefer keeping us on FreeBSD, but we just can't afford the downtime anymore. Another site is looking at moving to PostgreSQL on FreeBSD. Any help on this? Googling shows a long history of people having these problems but no solutions. Please don't give me a URL to a Google showing others having this problem--I've seen that and more. I want to know if there is a solution. Any help is appreciated! ... I have several MySQL and FreeBSD installs across a few different sites, and I consistently have problems with mysqld. It will begin to eat up all of the CPU and eventually become unresponsive (or the machine will just burn). I can't seem to manually reproduce this, but given enough time a FreeBSD box with mysqld will go down. Our servers are generally heavily loaded. I would say that I'm doing something wrong (although what I could be doing wrong I'm not sure), but I recently began working with another company that has the EXACT SAME PROBLEM. They are even thinking of moving to PostgreSQL, but we are trying to fix mysqld instead for now. This behavior has been seen on: FreeBSD 4.4, 4.7, 4.9, 4.10 MySQL 3.x and 4.x Typical load: 50 qps With and without replication enabled. Some sites are SELECT heavy, some are INSERT heavy. For one site I think we will be moving from FreeBSD to Linux for the MySQL servers since MySQL seems to run like a champ on Linux. We will continue to use FreeBSD for everything else. Anyone experienced this problem? Is it mysqld or FreeBSD? I can't pinpoint the exact issue. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"