From owner-freebsd-questions@FreeBSD.ORG Fri Apr 10 09:01:49 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A82663C3 for ; Fri, 10 Apr 2015 09:01:49 +0000 (UTC) Received: from formentor.toolfactory.net (pina.toolfactory.net [213.97.158.39]) by mx1.freebsd.org (Postfix) with ESMTP id 44C60238 for ; Fri, 10 Apr 2015 09:01:48 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by formentor.toolfactory.net (Postfix) with ESMTP id 0B330177B8D; Fri, 10 Apr 2015 11:01:48 +0200 (CEST) Received: from formentor.toolfactory.net ([127.0.0.1]) by localhost (formentor.toolfactory.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ckZ8J1NputvM; Fri, 10 Apr 2015 11:01:46 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by formentor.toolfactory.net (Postfix) with ESMTP id 1769D177BA6; Fri, 10 Apr 2015 11:01:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at logpmzimmta01v.toolfactory.net Received: from formentor.toolfactory.net ([127.0.0.1]) by localhost (formentor.toolfactory.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LkeAfofQ6v4t; Fri, 10 Apr 2015 11:01:46 +0200 (CEST) Received: from xorrigo.toolfactory.net (unknown [192.168.2.210]) by formentor.toolfactory.net (Postfix) with ESMTP id 010B4177BA2; Fri, 10 Apr 2015 11:01:45 +0200 (CEST) Date: Fri, 10 Apr 2015 11:01:44 +0200 (CEST) From: Raimund Sacherer Reply-To: Raimund Sacherer To: opendaddy@hushmail.com Message-ID: <369199529.123430074.1428656504549.JavaMail.zimbra@logitravel.com> In-Reply-To: <20150409185801.1B1E9401E3@smtp.hushmail.com> References: <20150409034121.7D7C720395@smtp.hushmail.com> <20150409113928.EE31F401E4@smtp.hushmail.com> <20150409185801.1B1E9401E3@smtp.hushmail.com> Subject: Re: Initial request to server extremely slow after longer periods of inactivity MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [192.168.2.213] X-Mailer: Zimbra 8.0.8_GA_6184 (ZimbraWebClient - SAF7 (Mac)/8.0.8_GA_6184) Thread-Topic: Initial request to server extremely slow after longer periods of inactivity Thread-Index: Rzd3iVMuOBxE0pj7TrV8jTrU3Be15g== Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:01:49 -0000 ----- Original Message -----=20 > From: opendaddy@hushmail.com > To: "Michael Schuster" , terje@elde.net, > freebsd-questions@freebsd.org > Sent: Thursday, April 9, 2015 8:58:00 PM > Subject: Re: Initial request to server extremely slow after longer period= s of > inactivity > It's probably not my DNS. From the NSD mailinglist: > > On 9. april 2015 at 6:49 PM, "Ond=C5=99ej Sur=C3=BD" = wrote: > > > > if you run the daemon in any environment that is resource starved and > > the process(es) gets swapped than anything will be slow on first reques= t > > after period of inactivity. Not just NSD and not just any DNS server, > > but anything... > I read somewhere that some people use a cron script to send a request to = the > webserver every so often. Is this something that everybody does but that > I've somehow missed? Does it have a name? > Thanks! > O.D. Hi,=20 we have quite a few unix servers around and I am unfamiliar with a cron-set= up just to keep some sort of connectivity going.=20 First I would check the /etc/resolv.conf, if you want post it.=20 Then what I would do in your case is open a few ssh sessions, run top with = cpu focus in one, top with IO focus in another and in a third i would take = a tcpdump written to a file. Maybe another session with vmstat to check on = pagin/pageout, etc.=20 Then I'd wait the appropriate amount of time and try a web connection, if i= t takes long, I'l check the top's if there is something going on (lot's of = CPU, lot's of IO, pages etc.) and check the tcpdump in wireshark to see if = there are problematic DNS queries which maybe are timing out, etc.=20 That should cover the bases ... Maybe you are on some sort of cheap VPS ser= vice which has resources severely over-commited and maybe your whole system= has to "wake up" ... but this is a very far-fetched scenario.=20 Best=20 Ray=20