[zeromq-dev] Very Small Messages/Manual

Matt Weinstein matt_weinstein at yahoo.com
Sat Jul 24 19:36:28 CEST 2010

Perhaps there should be a section entitled e.g. " Optimizing ZMQ "  
somewhere in the online documentation...

For example, you *could* tweak the VSM size (according to zmq.h) for  
certain applications and architectures --

/*  Maximal size of "Very Small Message". VSMs are passed by  
value            */
/*  to avoid excessive memory allocation/ 
deallocation.                        */
/*  If VMSs larger than 255 bytes are required, type of  
'vsm_size'            */
/*  field in zmq_msg_t structure should be modified  
accordingly.              */
#define ZMQ_MAX_VSM_SIZE 30

On Jul 24, 2010, at 10:57 AM, Martin Sustrik wrote:

> Oliver Smith wrote:
>> Martin Sustrik wrote:
>>> Messages below 30 bytes of
>>> length are called VSMs (very small messages) in 0MQ and are passed
>>> *without* any extra memory allocations.
>> Actually, this is a fairly important/useful piece of information.  
>> Can I
>> suggest that it be added to the main zmq.html of the manual under the
>> Messages heading?
> Hm. It's kind of an implementation detail. Our tests have shown that  
> for
> messages below 30 bytes copying them is less expensive than
> allocating/deallocating a chunk for the data. As everything stays  
> opaque
> for the users, I am not sure why they would be interested in that kind
> of detail.
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list