mwrap user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Sam Saffron <sam.saffron@gmail.com>
To: Eric Wong <e@80x24.org>
Cc: mwrap-public@80x24.org
Subject: Re: Add enable/disable methods
Date: Thu, 10 Oct 2019 19:49:49 +1100
Message-ID: <CAAtdryNmPFAEDhf9ctEiCsGioX50h9JzOn4CusU76th+Oj_7vw@mail.gmail.com> (raw)
In-Reply-To: <20191010084108.ai6glpnm3x4voru7@dcvr>

> Would still have to pay the extra size + tracking overhead
> even in no-op mode; since post-enable free() can operate on
> pre-enable malloc() results.

Oh I forgot about that, how about allowing it to start in 'disabled
mode' via env and then only allowing a `Mwrap.enable` once. (with no
.disable method)

That helps a lot with the profiling of unicorn workers cause the
master and multiple workers can be left in "almost zero impact" mode
and you can simply nuke the worker you were profiling once done.

On Thu, Oct 10, 2019 at 7:41 PM Eric Wong <e@80x24.org> wrote:
>
> Sam Saffron <sam.saffron@gmail.com> wrote:
> > Howdy,
> >
> > In our use case we would like to profile one of N unicorn workers
> > after a certain timeframe.
> >
> > Would you be open to adding
> >
> > `Mwrap.enable` : start profiling memory allocations
> > `Mwrap.disable` : disable all profiling of memory allocations, making
> > them as close as possible to a no-op.
> >
> > and an env var for starting disabled
> >
> > `MWRAP_OPTIONS=disabled`
>
> Would still have to pay the extra size + tracking overhead
> even in no-op mode; since post-enable free() can operate on
> pre-enable malloc() results.
>
> >
> > An additional convenience method here for the entire workflow would be:
> >
> > `mwrap so_path` that returns the path to the module that needs
> > preloading, this makes it slightly easier to configure production
> > environments.
> >
> > Thoughts?
>
> Should be doable.  Got a bunch of other stuff coming up into the
> weekend; but should be able to find some time for it in a week
> or two.

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 22:11 Sam Saffron
2019-10-10  8:41 ` Eric Wong
2019-10-10  8:49   ` Sam Saffron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://80x24.org/mwrap/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAtdryNmPFAEDhf9ctEiCsGioX50h9JzOn4CusU76th+Oj_7vw@mail.gmail.com \
    --to=sam.saffron@gmail.com \
    --cc=e@80x24.org \
    --cc=mwrap-public@80x24.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mwrap user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://80x24.org/mwrap-public/0 mwrap-public/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 mwrap-public mwrap-public/ https://80x24.org/mwrap-public \
		mwrap-public@80x24.org
	public-inbox-index mwrap-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.mwrap
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.mwrap

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git