[zeromq-dev] Maximum number of zactors?

Arnaud Loonstra arnaud at sphaero.org
Wed May 22 10:54:21 CEST 2019


Also important to know is that czmq uses an environment var 
ZSYS_MAX_SOCKETS (default 1024) which limits the maximum number of 
filedescriptors even when the process is allowed more.

from the man page:
//  Configure the number of sockets that ZeroMQ will allow. The default
//  is 1024. The actual limit depends on the system, and you can query it
//  by using zsys_socket_limit (). A value of zero means "maximum".
//  Note that this method is valid only before any socket is created.
CZMQ_EXPORT void
     zsys_set_max_sockets (size_t max_sockets);

Rg,

Arnaud


On 5/16/19 6:01 PM, Doron Somech wrote:
> File descriptor is being used for signaling.
> If zactor would use thread safe sockets it would be unlimited.
> 
> On Thu, May 16, 2019, 18:51 Arnaud Loonstra <arnaud at sphaero.org 
> <mailto:arnaud at sphaero.org>> wrote:
> 
>     Hi all,
> 
>     I'm currently stress testing a setup with actors. What's the maximum
>     number of running zactors? As it's using inproc no file descriptors are
>     involved. I'm using this test:
> 
>           // mega zactor test
>           zlist_t *spawned_act = zlist_new();
>           for (int i=0;i<507;i++)
>           {
>               zactor_t *act = zactor_new(echo_actor, "Hello actor");
>               assert(act);
>               zlist_append(spawned_act, act);
>           }
>           while(zlist_size(spawned_act) > 0)
>           {
>               zactor_t *dstr = zlist_pop(spawned_act);
>               zactor_destroy(&dstr);
>           }
> 
>     If I go beyond 507 actors I receive an assert:
> 
>     src/zsock.c:88: zsock_new_checked: Assertion `self->handle' failed.
> 
>     Which traces back to:
> 
>     self->handle = zsys_socket (type, filename, line_nbr);
> 
>     Which is a wrapper for creating a zmq socket.
> 
>     Any ideas why there's is this limit of 507 actors?
> 
>     I also tried with my own actor library which adds pub/sub sockets to
>     the
>     actor. I then have a maximum of 252 actors.
> 
>     Rg,
> 
>     Arnaud
> 
>     _______________________________________________
>     zeromq-dev mailing list
>     zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>     https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 



More information about the zeromq-dev mailing list