From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id DC9CC200B9 for ; Sat, 5 May 2018 19:00:20 +0000 (UTC) Received: by mail-it0-x233.google.com with SMTP id e20-v6so7199114itc.1 for ; Sat, 05 May 2018 12:00:20 -0700 (PDT) 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 :cc; bh=40fqYq/xV/UF7zxMpoiJLeN5M3D79Hxbs2xSlcY0TEw=; b=gYhDEKCC1VtpfM6UA3AqdHcm8ThVBqF/Fr/dxNSXxkzfaXsrbjTT/2IsVrYq5o5tOn J4SwTHRjMDVf3ooyGrYxHqFrPqwNLLcZmUvUbluChOao98Ie2d26GtWedfqn1YiWh5cn 3IDk+2hYldz/tgbDE6AJzVk6HY041hHD5T30DPMrkdRMLTPuRXHbFnmwnVgBw6y8iuYb wXG7cLMuP+ibTg5foAaxIxNR+G6dVXUxMuGBf321tbt7u/lD4pBC0uKwDLoC0Ti2w8m+ LbZb04x9HMyCiSybiww2vVkdSGbAueWOa1yKcyVlFvhs8eMQv/+4v9swadbpxQsfZQ4x SenQ== 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:cc; bh=40fqYq/xV/UF7zxMpoiJLeN5M3D79Hxbs2xSlcY0TEw=; b=GdGsMpDlgBGTY640rEvQ5DnxXxM2Rkzq6cIjhqMK7yf9QGwo+9GLktySSdQfcKwh7R a9ogUWisTmKotjCFXYVgPsn7U39jMndAUbkv3xZrdH0xadc1clpUxH4A8bftNQ+YIXXI ScapqPiM6rlO38XMkwdmDYaRjxL/NMOZ05lstQh5l7CX5H5sqyN2sATRvLGFbDFN43tR lUmqu/JIZZ3XkWaFokynEwgGVkIQ//fG4qMLa4MuzPvzXVcEG1nZMLzsDaaPnNf2ikkR ioHxseWVnu7BQHES6PP5E3LrUMAn6CQekmpXSLhj3MlQVcU3jVyp/Ab65BOIkWVQvLfc JFFg== X-Gm-Message-State: ALQs6tCJ57uOu8kX3oDPD9Aw0W8F5uPsn/A10SdBNghPi019oJDi7d6z OP4UOtDai0WeFkCiBJE1bIEpxPsdn49SRr96PVs= X-Google-Smtp-Source: AB8JxZqbpApYk0eyCbYnb5uEYA8viBHvhXDZ08Rjfyq2EiMw/aiAgyzLT9N5WLG/xisKnnM8YtsEBxJCx5uHmHEdlBc= X-Received: by 2002:a24:6243:: with SMTP id d64-v6mr1884099itc.78.1525546819787; Sat, 05 May 2018 12:00:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.39.209 with HTTP; Sat, 5 May 2018 12:00:19 -0700 (PDT) In-Reply-To: <20180419024548.GA20200@dcvr> References: <20180419024548.GA20200@dcvr> From: sumit nagariya Date: Sun, 6 May 2018 00:30:19 +0530 Message-ID: Subject: Re: Why Unicorn master process memory increasing To: Eric Wong Cc: unicorn-public@bogomips.org, Hleb Valoshka <375gnu@gmail.com> Content-Type: text/plain; charset="UTF-8" List-Id: Hi Eric, Sorry for my late response, somehow missed your mail. Just to update I managed to fix the issue, it was related to GC. We were using unciron's oob_gc to control gc execution. Although we had correct configuration for oob_gc but somehow it was not allowing GC to run. I checked GC stat and found that major & minor GC count is consistent over the time. I removed oob_gc and now using gctools gem. With gctools gem master memory is consistent to ~400MB. Thanks a lot for your help. Regards, Sumit On Thu, Apr 19, 2018 at 8:15 AM, Eric Wong wrote: > Hleb: remember to reply-all, we will never require subscription > to post to this list, so it's likely sumit never saw it. > > Hleb Valoshka <375gnu@gmail.com> wrote: >> I believe it's hard to say something without your unicorn configuration file. > > sumit: what Hleb asked... > > I suspect "preload_app true" in your config is loading something > in your app which is using up your memory. Sometimes there's > monitoring threads which might fill a queue up or something. > > Anything in error logs? Failing that, strace (on Linux) might > tell you what's going on at the error level. > > But yeah, the master process shouldn't be doing anything besides > listening to signals and respawning failed workers. > > If you want to check if there's monitoring threads on Linux > systems with /proc mounted, you can see how many threads the > master has: > > ls /proc/$PID_OF_MASTER/task/ > > There should be two entries for Ruby 1.9-2.5(*), one being the > master PID and one for the timer-thread. If you have more, > then that's probably some thread doing stuff in the > background... > > (*) _maybe_ we can get rid of timer-thread for 2.6... -- Thanks & Regards Sumit Nagariya