Re: FreeBSD and MySQL - mysqld eats CPU alive

2004-07-31 Thread dap99
 removed hackers@, database@

 Before the rest of the message ... I think it'd be best not to shotgun
 your mails like this...

Hello.

I would disagree with this. This is obviously both database@ and
questions@ appropriate. I also feel that it is hackers@ appropriate as it
deals with an old, existing, and non-trivial problem that is very much
related to FreeBSD. (In fact, reading the URLs you note below, this was
almost entirely a FreeBSD internals problem.)


 It's certain combinations of the two, best I can tell.  Looks like you
 can stay with FBSD if you want to do the tweaking --- be sure and
 read the second article if your are going to read the first 

 FreeBSD or Linux for your MySQL Server?
 http://jeremy.zawodny.com/blog/archives/000203.html

 Revisiting FreeBSD vs. Linux for MySQL
 http://jeremy.zawodny.com/blog/archives/000697.html

Excellent. I had read his earlier notes a long time back, but did not know
he had found some solutions to this problem.


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


bind 8 slow when resolving new domains!

2004-05-06 Thread dap99
I am having a big problem with slow internal DNS (bind 8 on FreeBSD 4.9).
If we do a query against a local domain (our DNS server is authoratative)
then the response is fast. If we do a query against anything in bind's
cache the resp. is fast. If we do a query for a new non-local domain then
the resp is SLOW or times-out. FYI, we are behind a NetScreen firewall at
a colo. The colo promises it is not them. Also, we are using their two DNS
servers as forwarders.

The colo promises it's not them, but frankly I can't see how it's us.

# tcpdump -n host ns2 and \( icmp or udp \)
10:07:37.832611 192.168.42.78.53  isp-dns1.53:  4240+ [1au] A?
www.altavista.com. (46)
10:07:51.013213 192.168.42.78.53  isp-dns2.53:  4240+ [1au] A?
www.altavista.com. (46)
10:07:51.074160 isp-dns2.53  192.168.42.78.53:  4240 2/9/10
CNAME[|domain] (DF)
10:07:51.074476 192.168.42.78.53  isp-dns1.53:  17509+ [1au] A?
avatw.search.yahoo2.akadns.net. (59)
10:07:51.131568 isp-dns1.53  192.168.42.78.53:  17509 1/9/10 (393) (DF)

That's a query for www.altavista.com. That took around 13 seconds. I'm
surprised it didn't time-out!

Here is my options {} (more to follow after this):

options {
directory /etc/namedb;

listen-on { 192.168.42.78; };

forward only; // added while troubleshooting
forward first; // added while troubleshooting
forwarders {
isp-dns1;
isp-dns2;
};

allow-transfer {
127.0.0.1;
192.168.42.0/24;
};

fetch-glue no;

// we have a firewall between us and the Internet, so let's
// go ahead and define our query source port
query-source address 192.168.42.78 port 53;

named-xfer /usr/libexec/named-xfer;
};

Okay, so what happens if I try to disable my forwarders?

I now have:

...
//  forward only;
//  forward first;
//forwarders {
//isp-dns1;
//isp-dns2;
//};
...

So let's try a random domain name:

ns2# nslookup www.looser.com
Server:  ns2
Address:  192.168.42.78

*** ns2 can't find www.looser.com: Non-existent host/domain
ns2# nslookup www.looser.com
Server:  ns2
Address:  192.168.42.78

Name:www.looser.com
Address:  217.8.158.117

# tcpdump -n host ns2 and \( icmp or udp \)
tcpdump: listening on rl0
10:13:50.515557 192.168.42.78.53  192.33.4.12.53:  21568 [1au] A?
www.looser.com. (43)
10:13:50.562594 192.33.4.12.53  192.168.42.78.53:  21568- 0/13/14 (475)
10:13:50.563816 192.168.42.78.53  192.33.14.30.53:  39445 [1au] A?
www.looser.com. (43)
10:13:50.619570 192.33.14.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:13:50.619641 192.168.42.78.53  192.33.14.30.53:  39445 A?
www.looser.com. (32)
10:13:58.018699 192.168.42.78.53  192.55.83.30.53:  39445 [1au] A?
www.looser.com. (43)
10:13:58.249039 192.55.83.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:13:58.249153 192.168.42.78.53  192.55.83.30.53:  39445 A?
www.looser.com. (32)
10:14:06.018825 192.168.42.78.53  192.41.162.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:06.051960 192.41.162.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:06.052112 192.168.42.78.53  192.41.162.30.53:  39445 A?
www.looser.com. (32)
10:14:09.431353 192.168.42.78.53  192.33.14.30.53:  7462 A?
www.looser.com. (32)
10:14:09.489141 192.33.14.30.53  192.168.42.78.53:  7462- 0/2/2 (109) (DF)
10:14:09.489528 192.168.42.78.53  64.247.9.98.53:  56483 [1au] A?
www.looser.com. (43)
10:14:09.544852 64.247.9.98.53  192.168.42.78.53:  56483*- 1/2/1 A
217.8.158.117 (104) (DF)
10:14:14.018941 192.168.42.78.53  192.43.172.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:14.160251 192.43.172.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:14.160333 192.168.42.78.53  192.43.172.30.53:  39445 A?
www.looser.com. (32)
10:14:22.019082 192.168.42.78.53  192.54.112.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:22.147459 192.54.112.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:22.147543 192.168.42.78.53  192.54.112.30.53:  39445 A?
www.looser.com. (32)
10:14:30.019186 192.168.42.78.53  192.42.93.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:30.071152 192.42.93.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:30.071232 192.168.42.78.53  192.42.93.30.53:  39445 A?
www.looser.com. (32)
10:14:38.019329 192.168.42.78.53  192.31.80.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:38.052275 192.31.80.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:38.052367 192.168.42.78.53  192.31.80.30.53:  39445 A?
www.looser.com. (32)
10:14:46.019458 192.168.42.78.53  192.52.178.30.53:  39445 [1au] A?
www.looser.com. (43)
10:14:46.155902 192.52.178.30.53  192.168.42.78.53:  39445 FormErr- [0q]
0/0/0 (12) (DF)
10:14:46.156056 192.168.42.78.53  192.52.178.30.53:  39445 A?
www.looser.com. (32)
10:14:54.019582 192.168.42.78.53  192.12.94.30.53:  39445 [1au] A?
www.looser.com. 

Jails not quite stable..

2004-01-10 Thread dap99
I am working on a project to move various services running directly under
FreeBSD 4.8-REL to run under jails on the same servers. Setting up the jails
is no problem at all (I can follow manpages), and bringing the jails up
using either '/bin/sh /etc/rc' or '/usr/local/sbin/jailer' works as well.
Basically, I can get a jail up and running with the desired service.

However, I've found that jails are producing some problems during my
testing.

1. On several occassions I have been unable to kill a process in a jail,
even with a 'kill -9' from inside or outside the jail as root.

europa# ps aux|grep J
root  90423  0.0  0.4  1268  920  p0- DJ   10:44PM   0:00.01 /bin/csh
europa# kill 90423
europa# ps aux | grep J
root  90423  0.0  0.4  1268  920  p0- DJ   10:44PM   0:00.01 /bin/csh
europa# kill -9 90423
europa# ps aux | grep J
root  90423  0.0  0.4  1268  920  p0- DJ   10:44PM   0:00.01 /bin/csh

(If I reboot this machine it will probably hang. See below.)

2. On one occasion (and I haven't attempted to replicate this), I tried a
server reboot (with 'reboot') after a jailed process would not die, and the
server promptly went offline to never return. I had to have someone hard
reset the server. Unfortunately, I am not sure what was on the screen as I
wasn't around. I can say though that the server was pingable but not
reachable otherwise.

3. If a process is hung, such as /bin/csh, then odd things happen when
accessing the location of the jail:

# cd /dsk/jails/
# ll
total 51684
drwxr-xr-x  13 root  wheel   512 Jan 10 22:17 mail1
-rw---   1 root  wheel  52896075 Jan 10 20:47 skel.tgz
# cd mail1europa
# ll
(ls just hangs at this point)

I have to kill my ssh session using ~. to get out of this. Note that
/dsk/jails/mail1 is not mounted via NFS. It's on the actual local disk.

These problems are reproducible across machines running both FreeBSD 4.8-REL
and FreeBSD 4.9-STABLE:

# uname -v
FreeBSD 4.9-STABLE #0:

I WANT to use jails to host most of our services, if for no other reason
than the increase manageability, but there just seems to be a stability
issue here. I realize I will get a lot of It works for me, but again,
these problems are reproducible, so I'm sure someone else has seen it. :)

Thoughts on this?

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