From owner-freebsd-questions@FreeBSD.ORG Tue Apr 21 04:56:54 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 D07D95CD for ; Tue, 21 Apr 2015 04:56:54 +0000 (UTC) Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com [IPv6:2607:f8b0:4003:c01::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 951CEEA8 for ; Tue, 21 Apr 2015 04:56:54 +0000 (UTC) Received: by obbeb7 with SMTP id eb7so136389443obb.3 for ; Mon, 20 Apr 2015 21:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=p3UAb10xNzoY6l0mKzV35RU5HW/U4yIgIL2KrxcvWJs=; b=m40SqjkaySi1Hg64EOm4lvX3c3XtCra0NKmkP9/9SkK2rMWHJpNq0hztuKCN2/Fl25 PEguj9VyTXvTKXh/uzb22oGFc2T85oopJeFnbaQ2jbD+MCoICiIQGaExHvb0UUceW+5U /IwWiDX96gFvoNREpkfT0KkZtbf9PaK4B4JgBXYX6D4jgDOJ0UAwwJqSjxiNhUqQOOIJ zwS0C4TcRu250cWxFfcpV7uhvSF4FivT5pnc2SpwkfzNXp6/79VGj/lH15gkQZI1BWOV ppCR42YlU8KvXWnAd5U8Vpp+BuCSyPIa0Lyv2mduwQm1RIvS5EB5U47TjYGr8D01yBnZ Uo6w== MIME-Version: 1.0 X-Received: by 10.202.62.215 with SMTP id l206mr16205951oia.122.1429592213838; Mon, 20 Apr 2015 21:56:53 -0700 (PDT) Received: by 10.76.72.66 with HTTP; Mon, 20 Apr 2015 21:56:53 -0700 (PDT) In-Reply-To: <20150415085039.GF1280@xtaz.uk> References: <20150415085039.GF1280@xtaz.uk> Date: Tue, 21 Apr 2015 08:56:53 +0400 Message-ID: Subject: Re: High LA caused by php-fpm From: Dimitri Minaev To: Matt Smith , Dimitri Minaev , freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 04:56:54 -0000 Thanks, Matt. I'm not sure whether the problem was in OpenSSL, but it was definitely in PHP. I installed 5.4 and the LA immediately dropped to reasonable figures. PHP packaged in php5 even includes php-fpm and I didn't have to compile it myself. So, I think I must have done something wrong when compiling it. Still trying to pinpoint the real problem... On 15 April 2015 at 12:50, Matt Smith wrote: > On Apr 15 12:02, Dimitri Minaev wrote: > >> Today, I tried to move our bunch of Drupal-powered web sites to a new >> server. The old server was running FreeBSD 7.2 and I wanted to install a >> newer version. In the meanwhile, I transferred the sites to the new server >> (FreeBSD 10.1 on ZFS mirror, 1CPU with 6 cores and hyperthreading). >> Everything looked fine, but as soon as the requests rate reached the usual >> 50-150 req/sec, the server shut up. Load average went up to 60, all >> requests timed out and the backlog on php-fpm socket was full (2048). All >> diagnostic tools showed that I/O was negligible, there was no swapping and >> the only problem was high CPU usage caused by php-fpm. >> > > Hi, I had exactly this problem myself along with several other things > behaving strangely because of the OpenSSL 1.0.2 update. For me, recompiling > openssl with the ASM optimisation option switched off worked around the > problem. With ASM on php-fpm used up huge amounts of load average, with ASM > off the behavior is back to normal. Of course your issue may not be related > to this, but it could be something to investigate. I discussed my issues in > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198788 , search for > php-fpm on that page. > > -- > Matt > -- With best regards, Dimitri Minaev