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 82EE9200D50 for ; Mon, 4 Dec 2017 17:26:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 81693160BF9; Mon, 4 Dec 2017 16:26:23 +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 9FCFB160BF3 for ; Mon, 4 Dec 2017 17:26:22 +0100 (CET) Received: (qmail 42475 invoked by uid 500); 4 Dec 2017 16:26:20 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 42455 invoked by uid 99); 4 Dec 2017 16:26:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2017 16:26:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AB35FC0D68 for ; Mon, 4 Dec 2017 16:26:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jqmUGUCy2MGi for ; Mon, 4 Dec 2017 16:26:15 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 52F615F478 for ; Mon, 4 Dec 2017 16:26:15 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id f20so19842026lfe.3 for ; Mon, 04 Dec 2017 08:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=jkwoMgJ3MUz2i5xbXeY6Rwg1xAYnfWvUU2YfA5QJRro=; b=pzoYvu1+jIQ+KdEtKbJxKni0WJzxShch9zvWXAPXCRdjLOMm88212/YTNuP+sfwSae RP2lol/52mKPb65uBww/a3UhQXybPdsMIgt+OXSMhpYXYS7oPa8CcHhF9VfwkcK6qPGA ooK2Jcb3qB3z6d8F9+y2nZtS7iV8WoJIsws6r42ZOLb6laVnKABn7kntVkLtG23J9Y5Z sTnr2yG9ZfBYdOawCc1c6cQK5X6U/d3mgNaxuLIH1XbKzi8pTrRCTnqiV+jQn3nfdemH kb7XW0ect8GITKKfG2N7p+P56P2t3q9pToex+jNeJ8Pd5mmkqMcd52ERk0actO8pGXSo 8xLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=jkwoMgJ3MUz2i5xbXeY6Rwg1xAYnfWvUU2YfA5QJRro=; b=twrYGN2/uUwHTKTf0BrrgOBlyvmByRDzaltyiHw3MF2tvP/MWAnB0MxlEIMjxCw6r7 QZGFtLyLQ+/hxcWzyiPOTsoA64OXWVyFXN+EQ81YuO47vIgR50AKS1TLVnfLR2WLYBXB mF+JPB7GRjtt9IH9aFWiRfS/IZ4/dImYCzh19gE1CvVBXimgF0FBbANvdIXtlCPdWjei 1+5MpSQO6MlhfOUx9d11vYND5eOhl7xsXWCFeb+PxHgQtCEsqawEVEuakU6ttAcNjElj NY5V4yty1tugJtlqhiINeetQWuT/ayQ/M80VMyfAT2Whar2zeXMpCQvEg39kp3mH4GIk CBbg== X-Gm-Message-State: AJaThX5yzPWTq7f0ncBMabHZgLX8/29Nnqv2b8exJ+unvxyGa6jTedBP +ow70R0iVSiwjnP0xM0vigRjS9cYcbIMj12XiTH2Cjue X-Google-Smtp-Source: AGs4zMZVRHn2ALmJnPBR4saVVGdOvaLMK7B0hnzYT3oHfGpuzhKjJyW0P8P4DVWfeniYvhN7DwLz8FbZ4QLgpBHQnQ4= X-Received: by 10.25.24.39 with SMTP id o39mr8019851lfi.182.1512404774411; Mon, 04 Dec 2017 08:26:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.56.81 with HTTP; Mon, 4 Dec 2017 08:25:33 -0800 (PST) In-Reply-To: References: From: Erick Erickson Date: Mon, 4 Dec 2017 08:25:33 -0800 Message-ID: Subject: Re: check softCommit , autocommit and hard commit count To: solr-user Content-Type: text/plain; charset="UTF-8" archived-at: Mon, 04 Dec 2017 16:26:23 -0000 Neither commit does anything if no updates have been received. But you don't need to wait for the devs to STOP DOING THAT ;). In solrconfig.xml you can set: IgnoreCommitOptimizeUpdateProcessorFactory see the ref guide.... Best, Erick On Mon, Dec 4, 2017 at 12:53 AM, Puppy Linux Distros wrote: > Hi, > > Thanks Shawn for the help. > > I think I should have added few more details to my previous mail. > > I know it's a bad practice but due to some reasons, our application fires > hard commits via code(upon most of the /update) and invokes the /update api > with commit=true and application very less uses softcommits. I will > recommend devs to look forward with more softcommits and make use of > realtime searchers in future. > > However, my current scenario is to get the solr to latest 7.1.0 so I need > to collect the current traffic in solr to have an optimized trade-offs with > the latest stack that I am looking forward to. Current stack is bit older > like 4.10. so got to process/parse current solr logs. > > I have my own log storage mechanism with us so I have one month solr.log > stored and hence rotation/archive isn't an issue here. Once I get a hold of > unique phrases in each logs that appends with each type of > commits(softcommit, autohardcommit,hardcommit), I can frame some metrics of > current traffic. > > Our current stack still maintains default autocommit config like > opensearcher=false and 15s period. Currently dont have softcommits enabled, > however softcommits and hardcommits invokes explicitly from application, > hence its bit hard to get them separated from solr.log unless I get some > unique phrases/regex/words out of each log lines that each type of commits > fires. Would be really helpful if any inputs in this area. > > In addition to that, just wanted to confirm, if there no pending /update > written to disk, does autocommit really fires at it's interval or is it > going to be idle if nothing to write to disk..? In other way, suppose, I > made a softcommit on 5th second and I made a hardcommit explicitly on 10th > second, is it really going to happen an autocommit on 15th second for no > reason since hardcommit on 10th second has already wrote the changes to > disk and re-built the index. If it happens in that way, it makes sense to > me if I see very less autocommit logs since I have very frequent > hardcommits firing from the application. > > Every help is appreciated. > Thanks in advance, > > On Mon, Dec 4, 2017 at 10:51 AM, Puppy Linux Distros > wrote: > >> Hello, >> >> Thanks Shawn. Can you provide command to find the total number of >> autocommits in the solr.log? >> >> On Thu, Nov 30, 2017 at 7:20 PM, Shawn Heisey wrote: >> >>> On 11/30/2017 4:36 AM, Puppy Linux Distros wrote: >>> >>>> I am trying to calculate the total number of softCommit , autocommit and >>>> hard commit from the solr logs. Can you please check whether the below >>>> commands are correct ? >>>> >>>> Let me know how to find the total softcommit, hardcommit and autocommit >>>> from the logs. >>>> >>>> >>>> *1. totalcommit=`cat $solrlogfile | grep "start commit" | wc -l`* >>>> >>>> *totalcommit = **41906* >>>> >>>> >>>> *2. totalsoftcommit=`cat $solrlogfile | grep "start commit" | grep >>>> "softCommit=true" | wc -l`* >>>> >>>> *totalsoftcommit = **921* >>>> >>> >>> These look reasonable ... but be aware that the default logging config >>> will roll the solr.log file to a new empty file when it reaches 4 >>> megabytes, which doesn't really take that long on a busy server, so if >>> you're only looking at "solr.log" you may have an incomplete picture. I >>> personally change the roll size limit to 4 gigabytes so solr.log covers a >>> lot more time. >>> >>> Solr restarts will *also* roll/archive logfiles, so you probably can't >>> just look through every file in the logs directory that starts with >>> "solr.log" -- it may be difficult to figure out exactly which files apply >>> to the current running instance. It might turn out that I'm completely >>> wrong in that statement -- I haven't confirmed exactly what a Solr restart >>> actually does with the logfiles. >>> >>> *3. totalhardcommits=`cat $solrlogfile | grep "start commit" | grep >>>> "softCommit=false" | grep "openSearcher=true" | wc -l`* >>>> >>>> *totalhardcommits= **40982* >>>> >>> >>> If you have configured autoCommit in solrconfig.xml and have set >>> openSearcher to false in that config, then there will be hard commits that >>> *don't* open a new searcher, so the "openSearcher=true" part will not catch >>> those commits. Example configs in recent versions have autoCommit set up >>> this way, and this recommended config for *everybody*. The default >>> autoCommit interval in the example configs is 15 seconds, which I think is >>> a little too aggressive, but this kind of commit is typically very fast, so >>> I've never seen that config cause problems. >>> >>> The example configs do not have autoSoftCommit configured. If users want >>> to automatically do commits for visibility, we recommend that they use >>> autoSoftCommit. >>> >>> *4. totalautocommit=`cat $solrlogfile | grep "realtime" | wc -l`* >>>> >>>> *totalautocommit= 3* >>>> >>> >>> These aren't autoCommits. They are new searchers for the realtime get >>> handler, which is capable of accessing documents that haven't been >>> committed yet. In addition to the index on disk, it searches the >>> transaction logs. Opening a new realtime searcher should be very fast, and >>> they happen without any configuration. I'm not sure why you're only seeing >>> this happen three times here. Presumably in a log where there are 40000 >>> total commits, you are doing a fair amount of indexing, so I would have >>> expected a new realtime searcher to have been created much more frequently, >>> even if there were no commits done at all. >>> >>> Maybe the realtime get handler can use the standard searcher, and only >>> opens a new realtime searcher in cases where new documents have been >>> indexed but there hasn't been a recent commit that opens a new searcher. >>> If that's the case, then I have no idea how long it would wait before >>> firing up a new realtime searcher. I wouldn't expect that to be very long >>> ... so if your indexing/committing cycles are normally very fast, maybe >>> Solr doesn't feel it's necessary to open realtime searchers very often. >>> >>> Thanks, >>> Shawn >>> >>> >> >> >> -- >> Regards, >> >> Vivek CV >> >> >> > > > -- > Regards, > > Vivek CV