<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">If you want to avoid the global lock,
you can do so with cpg (<a class="moz-txt-link-freetext" href="https://github.com/okeuday/cpg/">https://github.com/okeuday/cpg/</a>), which
provides the same pg2 API with additional functionality. It does
this with the default macro define of <span class="no">GROUP_NAME_WITH_LOCAL_PIDS_ONLY</span><span
class="p"></span> where the global lock is not needed if only
local Erlang pids are used with the cpg API. If necessary, the
define could be commented in the cpg_constants.hrl file, to have
the same global locking pg2 does. cpg doesn't use ets like pg2
does, and with the default cpg_constants.hrl defines it requires
the group names are strings (list of integers), but that can be
changed with GROUP_STORAGE.<br>
<br>
On 12/12/2013 09:30 AM, Matthew Evans wrote:<br>
</div>
<blockquote cite="mid:BLU177-W315553144784F3184CEFDB9CDC0@phx.gbl"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=iso-8859-1">
<div dir="ltr"><br>
The one thing to watch for is that pg2 will take a global lock
over all nodes in a mesh when a join/leave is done. This means
that if you are doing lots of joins, and have a mesh of Erlang
nodes, then there is a performance overhead. Not a massive one,
but something to watch for.
<div><br>
<div>> From: <a class="moz-txt-link-abbreviated" href="mailto:mallen@alertlogic.com">mallen@alertlogic.com</a><br>
> To: <a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> Date: Wed, 11 Dec 2013 10:19:42 -0600<br>
> Subject: [erlang-questions] pg2 scale limits<br>
> <br>
> What has been the experience of folks with the
practical upper bound of<br>
> process groups registered with the pg2 application?<br>
> <br>
> I have an application where I need to track 10000 or so
process groups<br>
> across a set of erlang nodes (2 R14B04 Erlang VMs
running on top of 2<br>
> Debian VMs to start.) Would that size of registry cause
problems?<br>
> <br>
> I read <br>
>
<a class="moz-txt-link-freetext" href="http://christophermeiklejohn.com/erlang/2013/06/03/erlang-pg2-failure-seman">http://christophermeiklejohn.com/erlang/2013/06/03/erlang-pg2-failure-seman</a><br>
> tics.html and it was a great read - are there any other
pitfalls about pg2<br>
> that I should be aware of?<br>
> <br>
> I am planning to implement a "prototype" of this
application using pg2 at<br>
> reasonably low scale, but I am open to other
implementation suggestions or<br>
> applications (I looked at gproc too, but I'd rather
stick with pg2 if<br>
> possible because it comes "out of the box"...)<br>
> <br>
> Thanks.<br>
> <br>
> Mark<br>
> <br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>