Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C8F1174EE for ; Mon, 16 Mar 2015 20:14:57 +0000 (UTC) Received: (qmail 94506 invoked by uid 500); 16 Mar 2015 20:14:54 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 94448 invoked by uid 500); 16 Mar 2015 20:14:54 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 94435 invoked by uid 99); 16 Mar 2015 20:14:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2015 20:14:53 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=RCVD_IN_DNSWL_LOW,RCVD_IN_SBL_CSS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of philip.martin@wandisco.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2015 20:14:49 +0000 Received: by wibdy8 with SMTP id dy8so46863434wib.0 for ; Mon, 16 Mar 2015 13:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wandisco.com; s=gapps; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=5AUNhFwQtLvIVaxKAS25nn2FwsDYfOUWn60J+QJ1DZc=; b=rFXM2y+7QL4mJzuQuMiu9igrhI+oyr63Nh0PiRpANlkCbz6UeLbop+6vfwRzHqCEyn c09izFRBmNv3/gQNj8Z6Wjn/bpGE8c6LKcfp5F/dLXjfW/G/booVnulBpKOQha/7CB0R JCNzOUA4A3SsCqEuvm2Alk3O3Qr7moJRQ3kXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=5AUNhFwQtLvIVaxKAS25nn2FwsDYfOUWn60J+QJ1DZc=; b=nEAs99XLZCoNqCns1laILoyVeMrQEdE0bZds8g8C5Qd5sb5L9pkrRqBZfaWa0CbnhS P7b3hYxECt8EG+Imo0KdDiTXXIlXrVHCfH5KDS57B7xXrKtN68G6zvlCeot9sY01D0Mm 5Orp6TkTuKK44116CcS+4Pt/WvkKq8nTVZ1u0uVTYWFsvB0XoYBb5nQbWZ7SFQ0uM88N LFuSp67nbOyQ0vlTJj7wEu6PWUR0seDqKqSuIPN8A6mXyHj+ypodCPVGMyfuWXWYpIoN JfssvoimRLIamA8iE4VwcT/y9WAvMltRNShH2WjyJ5VXs8SJ0oqtBRpY59att4OR0O5f tdKQ== X-Gm-Message-State: ALoCoQlpX1hR+EDVRcMU7CGprVOEp5oet/VcEUvUWbEtCfFHDAcSZSpQpPgxzaYVS5gs1cyHcKKI X-Received: by 10.180.12.194 with SMTP id a2mr101441652wic.55.1426536732832; Mon, 16 Mar 2015 13:12:12 -0700 (PDT) Received: from localhost (cpc20-farn7-2-0-cust13.6-2.cable.virginm.net. [86.15.228.14]) by mx.google.com with ESMTPSA id hn8sm16799576wib.18.2015.03.16.13.12.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2015 13:12:12 -0700 (PDT) From: Philip Martin To: "Bert Huijben" Cc: "'Julian Foad'" , "'Marc Strapetz'" , "'dev'" Subject: Re: 1.9.x JavaHL: long initial delay when performing a log References: <55033BBE.2000905@syntevo.com> <089f01d05f83$2673c460$735b4d20$@qqmail.nl> <5506B7BD.3090406@syntevo.com> <091201d05ff4$7491de40$5db59ac0$@qqmail.nl> <871tkozx5e.fsf@wandisco.com> <002601d0601b$cd44dc50$67ce94f0$@qqmail.nl> Date: Mon, 16 Mar 2015 20:12:11 +0000 In-Reply-To: <002601d0601b$cd44dc50$67ce94f0$@qqmail.nl> (Bert Huijben's message of "Mon, 16 Mar 2015 20:02:50 +0100") Message-ID: <87r3soya5g.fsf@wandisco.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Checked: Checked by ClamAV on apache.org "Bert Huijben" writes: > Nice idea on the concept, but this patch doesn't implement that behavior > > You will see the first result very fast. (No behavior change) I don't understand, I see a behaviour change when I try it. The first few writes with my patch: [pid 8814] writev(17, [{"HTTP/1.1 200 OK\r\nDate: Mon, 16 M"..., 189}, {"1f53\r\n", 6}, {"\n166"..., 54}, {"\r\n", 2}], 5) = 8216 [pid 8814] writev(17, [{"1f55\r\n", 6}, {"rhuijben<"..., 7976}, {"2015-02-14T00:17:25.9215"..., 45}, {"\r\n", 2}], 4) = 8029 [pid 8814] writev(17, [{"1f6d\r\n", 6}, {"\n\n2015-01-15T04:00:33.4982"..., 45}, {"\r\n", 2}], 4) = 8053 [pid 8814] writev(17, [{"1f4e\r\n", 6}, {"\n\nrhuijben<"..., 56}, {"\r\n", 2}], 4) = 8022 [pid 8814] writev(17, [{"1f47\r\n", 6}, {"2014-11-25T12:20:06.2266"..., 7953}, {"\n162"..., 54}, {"\r\n", 2}], 4) = 8015 [pid 8814] writev(17, [{"ba0\r\n", 5}, {"stsp\n161"..., 7973}, {"2014-06-30T13:46:18.9128"..., 45}, {"\r\n", 2}], 4) = 8026 The current code without my patch: [pid 9113] writev(17, [{"HTTP/1.1 200 OK\r\nDate: Mon, 16 M"..., 189}, {"fd\r\n", 4}, {"\n166"..., 169}, {"\r\n", 2}], 3) = 175 [pid 9113] writev(17, [{"14e\r\n", 5}, {"\n166"..., 334}, {"\r\n", 2}], 3) = 341 [pid 9113] writev(17, [{"294\r\n", 5}, {"\n166"..., 660}, {"\r\n", 2}], 3) = 667 [pid 9113] writev(17, [{"53a\r\n", 5}, {"\n166"..., 1338}, {"\r\n", 2}], 3) = 1345 [pid 9113] writev(17, [{"a7c\r\n", 5}, {"\n166"..., 2684}, {"\r\n", 2}], 3) = 2691 [pid 9113] writev(17, [{"1511\r\n", 6}, {"\n166"..., 5393}, {"\r\n", 2}], 3) = 5401 [pid 9113] writev(17, [{"1f46\r\n", 6}, {"\n166"..., 7951}, {"stefan22015-02-13T10:00:18.5170"..., 2746}, {"\r\n", 2}], 3) = 2753 [pid 9113] writev(17, [{"1f61\r\n", 6}, {"\n165"..., 7988}, {"2014-12-06T02:05:01.7811"..., 45}, {"\r\n", 2}], 4) = 8041 [pid 9113] writev(17, [{"1f60\r\n", 6}, {"\n\nrhuijben<"..., 56}, {"\r\n", 2}], 4) = 8040 [pid 9113] writev(17, [{"153a\r\n", 6}, {"2014-10-20T12:44:19.4131"..., 5434}, {"\r\n", 2}], 3) = 5442 > BTW 500 msec is about two or three the time you expect for google page of > results.... Why this arbritrary number? How do you explain the 2 and 2048 in the current code? They are all just arbitrary numbers. Make it 100ms instead of 500ms. The trace above is what I got for a debug build and 200ms. Several 8K writes in the first 200ms followed by a short 3K write when the first extra flush triggers after 200ms. That's a very fast server that doesn't need the extra flushes. If I introduce a delay into the log loop, 50ms between revisions, I see more of the extra flushes: [pid 9751] writev(17, [{"HTTP/1.1 200 OK\r\nDate: Mon, 16 M"..., 189}, {"588\r\n", 5}, {"\n166"..., 1338}, {"\r\n", 2}], 3) = 1345 [pid 9751] writev(17, [{"a7c\r\n", 5}, {"\n166"..., 2684}, {"\r\n", 2}], 3) = 2691 [pid 9751] writev(17, [{"1511\r\n", 6}, {"\n166"..., 5393}, {"\r\n", 2}], 3) = 5401 [pid 9751] writev(17, [{"1f46\r\n", 6}, {"\n166"..., 7951}, {"stefan22015-02-13T10:00:18.5170"..., 2746}, {"\r\n", 2}], 3) = 2753 [pid 9751] writev(17, [{"1f61\r\n", 6}, {"\n165"..., 7988}, {"2014-12-06T02:05:01.7811"..., 45}, {"\r\n", 2}], 4) = 8041 [pid 9751] writev(17, [{"1f60\r\n", 6}, {"\n\nrhuijben<"..., 56}, {"\r\n", 2}], 4) = 8040 [pid 9751] writev(17, [{"153a\r\n", 6}, {"2014-10-20T12:44:19.4131"..., 5434}, {"\r\n", 2}], 3) = 5442 [pid 9751] writev(17, [{"1f52\r\n", 6}, {"\n161"..., 7973}, {"2014-06-30T13:46:18.9128"..., 45}, {"\r\n", 2}], 4) = 8026 The first flush happens after 8 revisions because the first 4 revisions all get written within the first 200ms. The 8th revision is the first flush after 200ms. I'm not claiming this is the best algorithm, I just want to know if it is the sort of thing we want. -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*