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 09D0F200D31 for ; Sat, 21 Oct 2017 05:39:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 081D6160BED; Sat, 21 Oct 2017 03:39:08 +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 4D6CF160BCB for ; Sat, 21 Oct 2017 05:39:07 +0200 (CEST) Received: (qmail 21691 invoked by uid 500); 21 Oct 2017 03:39:06 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 21678 invoked by uid 99); 21 Oct 2017 03:39:05 -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; Sat, 21 Oct 2017 03:39:05 +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 E543F180778 for ; Sat, 21 Oct 2017 03:39:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.044 X-Spam-Level: **** X-Spam-Status: No, score=4.044 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313, URI_TRY_3LD=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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NmSrfzjRbthd for ; Sat, 21 Oct 2017 03:39:02 +0000 (UTC) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CE93E5F238 for ; Sat, 21 Oct 2017 03:39:01 +0000 (UTC) Received: by mail-it0-f51.google.com with SMTP id 72so739885itk.3 for ; Fri, 20 Oct 2017 20:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=RO2EFA9FJvWbTvino1xEHKCsebJNzR7IGFiURF4KDgc=; b=K9Nf3EZViFSYmuSY0IO+IpOB9J8hzDDuVQZAWF/Ymp6u4M7FqhoJAhAfonDVz0+j5V cp5f/x4Ekf8CgYtsV5cylFy7FUciVP0/93od5s3NzoL+qO+pmCyXRKb0elPxnPLHYem3 DZUbkOuHxJ7kHhLA58sWCQrE5qmlhPUfxF9xc2Zmx3hCSEXS53fKooEWPrE547TATYV3 4KoG9fmb0FqKnu6Gd0SRmc4OD/JJ79tOHYjx/mwZPiaPbAa1vuBEDjlUWCpkiaWdF5za Y2+G5MgnthYYaULh1KnEbxohwq/3AMiVfsTBIFk4+ool0TGhStYS1WKVwDt/lzaX1aYS jSfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=RO2EFA9FJvWbTvino1xEHKCsebJNzR7IGFiURF4KDgc=; b=WUG0JiaxE9hGlnFnvC497XKtvaJHp5wrkTiJ7eXCLnAw2Wq9iB6kfepMhUirLwtYoi +IYEg7OeIa+l6J0rirAjnqdGC0kgPctyrtCUzFCwNj9f/rce0fGyQ3Q8vhP0AzZ2vVcq y0mpBuDn0hdEj5nCSW9obeB8sMnku3ahRhaK9PAb3aGBJJwei6nR8dpuSDoYHf1uNqNa RbVjY7T0yyvkX80z7expChJsn4IKI0Lgi+DjBigd+96UsgafFWjHSfovnnySTgiqVUdU GDymdJ7/lqChFnjiPuWChFEZ5ivaRR90JBql2Wd/2axdPjiOc035PYSsUWLFZGszfVeM OMmw== X-Gm-Message-State: AMCzsaUDsJhNpbyPHrKYxai/nleS/XTfwk51hyqNcIb9YHbtbInOf4Qq wz7W28nacvBlGxcrQjN6RS6U3VIXRHLTz/yHQxc9Kw== X-Google-Smtp-Source: ABhQp+SHOM+emizb0ErlRA6sXFUBYi8lsSBM4p4/50p0g/SU6keS9p8FlvtLZw7re0i2QjKbFtZV9wZNGGwq/pBkcsA= X-Received: by 10.36.108.81 with SMTP id w78mr1206357itb.140.1508557134787; Fri, 20 Oct 2017 20:38:54 -0700 (PDT) MIME-Version: 1.0 Sender: tbain98@gmail.com Received: by 10.2.102.30 with HTTP; Fri, 20 Oct 2017 20:38:34 -0700 (PDT) In-Reply-To: <1508528689643-0.post@n4.nabble.com> References: <1508528689643-0.post@n4.nabble.com> From: Tim Bain Date: Fri, 20 Oct 2017 21:38:34 -0600 X-Google-Sender-Auth: tfnC-DrPrCQ3a2CtISzWdXtb6pI Message-ID: Subject: Re: Checkpoint worker; what's it doing? To: ActiveMQ Users Content-Type: multipart/alternative; boundary="001a1145a84e247996055c0654ff" archived-at: Sat, 21 Oct 2017 03:39:08 -0000 --001a1145a84e247996055c0654ff Content-Type: text/plain; charset="UTF-8" The org.apache.activemq.store.kahadb.MessageDatabase .CheckpointRunner does the following: 1. If the journal does periodic disk syncing rather than immediate syncing and the sync period has elapsed, it causes unsynced content to be written to disk. 2. If the cleanup interval has elapsed, it performs cleanup (identifies and deletes files that contain no unacknowledged messages, performs ack compaction if enabled, flushes any pending index-modifying operations in the pagefile, and then deletes any files that are no longer referenced). 3. If the checkpoint interval has elapsed, it performs a checkpoint (flushes any pending index-modifying operations in the pagefile, and then deletes any files that are no longer referenced) - basically a cleanup without the search for files that can be GC'ed and the ack compaction. The consequences of increasing the period of these events are the following: 1. If you're doing periodic disk syncing, you incur a greater risk of losing data. If not, there is no effect on this particular dimension. 2. Because the pagefile stays the same but you're going longer before flushing, you're more likely to fill it before the next flush, in which case writes are done either in the background or synchronously within the current thread, which may be less efficient. So your throughput could drop, but how much would probably depend heavily on how heavily you're using the persistent store. You asked whether there was any negative impact of having it run less frequently, but I'll turn the question around: what positive impact do you believe you'll achieve by having it run less frequently, such that it's worth 1) your time, and 2) the increased odds of hitting edge cases caused by running in an uncommonly-used configuration? Have you measured a performance impact of the operations of that thread? Tim P.S. All information in this email comes from some time this evening reading through this code for the first time, so it's entirely possible that I've missed or misrepresented something here. YMMV. On Fri, Oct 20, 2017 at 1:44 PM, Raffi wrote: > It's my understanding each kahadb is assigned a checkpoint thread which, > every 5s (default), wakes up and does something; what is it doing, and is > there any negative impact if the interval is increased to 60s or 120s? We > are using persistent messages, jsyk > > > > -- > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User- > f2341805.html > --001a1145a84e247996055c0654ff--