[zeromq-dev] ZMQ Message Size Limitations

Mark Hotchkiss mark.hotchkiss at yahoo.com
Fri Apr 11 18:34:39 CEST 2014


But I would think that it would be killed almost instantly if that was the case. It runs for like 20 to 30 minutes before it is killed. 

I don't background any of these processes and the taskvent process runs for a long time before I get the command prompt back even when it completes all of the jobs with a smaller message. And the the ~93% of memory usage (using UNIX "top" command) is very consistent until it is killed. So I don't think that is the problem.

Here is another possibility for you to consider. We are constructing a new message in the Ventilator in each cycle inside the loop:

for (task_nbr = 0; task_nbr < numberOfJobs; task_nbr++) {

                // Stuff a character array with a bunch of AAAAA
                // characters of quantity based on messageSize
                unsigned char *p = (unsigned char *) malloc(
                                messageSize * sizeof(unsigned char));
                memset((void *) p, 'A', messageSize);
                p[messageSize - 1] = '\0';

                // Send the message and reclaim memory
                s_send(sender, p);
                free(p);
        }

Notice that the last two lines of code, I am sending the message and immediately calling "free()" after sending. Do you think it is possible that the memory is being freed too soon before the message completes sending?

In the meantime, I am going to run this in a debugger to see where it is actually crashing.

Mark
On Friday, April 11, 2014 12:29 AM, Pieter Hintjens <ph at imatix.com> wrote:
 
Mark,

> 3. In window #3:  ./taskvent 5000 23000000    (jobs, messageSize in bytes)
> After a
> while, prior to completion, window #3 (taskvent) will display the word
> "Killed" and the process will stop without further action.

Perhaps it's consuming too much memory for a single process and then
being killed by the OS?

5000 x 2.3 MB = 11 500 MB.


-Pieter
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140411/9a879b7f/attachment.htm>


More information about the zeromq-dev mailing list