Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8CB10200C13 for ; Mon, 6 Feb 2017 20:24:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8B2AD160B56; Mon, 6 Feb 2017 19:24:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE4CD160B53 for ; Mon, 6 Feb 2017 20:24:33 +0100 (CET) Received: (qmail 94166 invoked by uid 500); 6 Feb 2017 19:24:32 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 94156 invoked by uid 99); 6 Feb 2017 19:24:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2017 19:24:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3DCD51800A5 for ; Mon, 6 Feb 2017 19:24:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id C2Z-IZQG4It9 for ; Mon, 6 Feb 2017 19:24:30 +0000 (UTC) Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B9F4C5F644 for ; Mon, 6 Feb 2017 19:24:29 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id e4so26078071pfg.1 for ; Mon, 06 Feb 2017 11:24:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=KwI6y6mnAZkzSyypI0eN6O2496o508tD32lvwq31AGs=; b=mdfJVZesk/0EEHqSOcv64pq9tERoSzfFW5q/Xq771v9NumZM41fE07vEIAMdArUzk2 HmWnrQm9fX63QfAFcR1CP3LjqR0mSnNlTncOXi1rCeCb5Z4TklDyJW2emYjY1l6oGrJ+ KZmsmaCPQVw7piym/S0IjICbRk93NXfEKHQULmHJs4vnLGSS6k5uNU9JjU3qXX35uO7Z 5u40IySOdRr+W4nAhBpZiMMuCqxIqtYQMkRknAz8G7w/D8ytdOW3x6BPnGI+rpHt9r8N gMn8h07+R1KgGNWVSFKlPXLuzMMU7HKgQw3LOZ90GCZM9mAih22SiRsj3knh8tXBUZCs qayg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=KwI6y6mnAZkzSyypI0eN6O2496o508tD32lvwq31AGs=; b=OVJJOTLtWcf9SMuwfpwJN0KRo7S/Fzkf2OyLBFVzoe1WYokMUHNDFirV+1hTPy4RWB d53XY+6N2Z50FqIF/qwzNUp5Y9MryUA54ZF5zEBqdJYmRdq0RTOr49eNQqOxntbDdLDT ebtc71wpaU0WbMh8/BWruR+mKAE0Hfl9XdRxjvUhjpTwHvI1h8qHcoLRuPfXbB0WMmtD hE1HsUecrB7pHzVF3S+//qMQ3bVP7+rNQxHm59qFUXfwKB17MSS31wparia090aVIVJl ci3ForYqLzF0DgDcSBKmrPTW0xOvYT5jaqVzCWfXStQtZQKZstBhb1f5NnJB6+eyzsr4 FcTg== X-Gm-Message-State: AIkVDXKa/4xgjrlyChpjW9w3ZG2/A47C9tMs6pjqzUw4wRmajW71dGZtsfjb/JP+DCu4Ug== X-Received: by 10.98.94.2 with SMTP id s2mr14906023pfb.133.1486409062630; Mon, 06 Feb 2017 11:24:22 -0800 (PST) Received: from [192.168.1.2] (50-39-112-180.bvtn.or.frontiernet.net. [50.39.112.180]) by smtp.gmail.com with ESMTPSA id z29sm4718220pgc.7.2017.02.06.11.24.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 11:24:22 -0800 (PST) Subject: Re: httpd 2.4.25, mpm_event, ssl: segfaults To: dev@httpd.apache.org References: <0a787764-e1ac-88e4-9b26-92d91bdd5d72@gmail.com> <75f8913a-d874-e2c8-d5f5-c917cf236c1e@gmail.com> From: Jacob Champion Message-ID: <8003d8ac-0451-8149-4560-3a0210fc1507@gmail.com> Date: Mon, 6 Feb 2017 11:24:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit archived-at: Mon, 06 Feb 2017 19:24:34 -0000 On 02/03/2017 12:30 AM, Niklas Edmundsson wrote: > Methinks this makes mmap+ssl a VERY bad combination if the thing > SIGBUS:es due to a simple IO error, I'll proceed with disabling mmap and > see if that is a viable way to go for our workload... (Pulling from a parallel conversation, with permission) The question has been raised: is our mmap() optimization really giving us the utility we want for the additional instability we pay? Stefan had this to say: On 02/03/2017 08:32 AM, Stefan Eissing wrote: > Experimented on my Ubuntu 14.04 image on Parallels on MacOS 10.12, > MacBook Pro mid 2012. Loading a 10 MB file 1000 times over 8 > connections: > > h2load -c 8 -t 8 -n 1000 -m1 http://xxx/10mb.file > > using HTTP/1.1 and HTTP/2 (limit of 1 stream at a time per > connection). Plain and with TLS1.2, transfer speeds in GByte/sec > from localhost: > > H1Plain H1SSL H2Plain H2SSL > MMAP on 4.3 1.5 3.8 1.3 > off 3.5 1.1 3.8 1.3 > > HTTP/2 seems rather unaffected, while HTTP/1.1 experiences > significant differences. Hmm... and I replied: Am 03.02.2017 um 21:47 schrieb Jacob Champion : > Weird. I can't see any difference for plain HTTP/1.1 when just > toggling EnableMMAP, even with EnableSendfile off. I *do* see a > significant difference for TLS+HTTP/1.1. That doesn't really make > sense to me; is there some other optimization kicking in? > > sendfile blows the mmap optimization out of the water, but naturally > it can't kick in for TLS. I would be interested to see if an > O_DIRECT-aware file bucket could speed up the TLS side of things > without exposing people to mmap instability. I was also interested to see if there was some mmap() flag we were missing that could fix the problem for us. Turns out a few systems (used to?) have one called MAP_COPY. Linus had a few choice words about it: http://yarchive.net/comp/linux/map_copy.html Linus-insult-rant aside, his point applies here too, I think. We're using mmap() as an optimized read(). We should be focusing on how to use read() in an optimized way. And surely read() for modern systems has come a long way since that thread in 2001? Considering the massive amount of caching that's built into the entire HTTP ecosystem already, O_DIRECT *might* be an effective way to do that (in which we give up filesystem optimizations and caching in return for a DMA into userspace). I have a PoC about halfway done, but I need to split my time this week between this and the FCGI stuff I've been neglecting. --Jacob