Node execution time

24 views
Skip to first unread message

Andrei Palade

unread,
Apr 19, 2017, 9:04:23 AM4/19/17
to PeerfactSim.KOM
How can I get the response time of the workload done by a node. For example, I have 2 operations that are executed by a central node. Each operation represents a broadcast which is initiated by the central node, and when a receiving node receives a broadcast message from the central node, it replies with an ACK message. Both operations do this. Now, the second operation also does some processing before it replies with the ACK message. However, when I measure the durations of these operations I get the same time, and the time to do that extra processing on each receiving node is completely ignored.

My question is how do I measure this work that a node does?

THIS IS THE FIRST OPERATION
 AVERAGE:     0.014519522935780     14519.522935780     109     compositionsimulator.centralised.overlay.operations.JoinControllerOperation
 MIN:         0.0029640000000000     2964.0000000000
 MAX:         0.025368000000000     25368.000000000

THIS IS THE SECOND OPERATION
 AVERAGE:     0.014519522935780     14519.522935780     109     compositionsimulator.centralised.overlay.operations.QualityLevelsRequestOperation
 MIN:         0.0029640000000000     2964.0000000000
 MAX:         0.025368000000000     25368.000000000

As you can see they have the same time. That extra processing done by each node is completely ignored.

Kalman

unread,
Apr 21, 2017, 7:00:28 AM4/21/17
to PeerfactSim.KOM
Dear Andrei,

operations in PeerfactSIm.KOM describe networking events scheduled in the simulators' time line.
That means that when an event is scheduled for a given time (in discrete simulation time), the corresponding operation is launched and executed. Typically if a message is sent it is passed to the lower layer (network layer), which calculates the transmission delay and schedules a new event for the receiving node, that a new message will be delivered at that time: delivery time = current time + transmission time.
Just to make it sure, to my knowledge the network layer is only used to calculate delays to be added for future events. Things like processing time are not considered in the simulator, so you would have to do this on your own.

That means: It does not matter how complex and long lasting the calculations in a node are, once the node decides to send the results or whatever message to another node, the network layer calculates the delivery time.

If you want to also consider a delay for processing time., you could reschedule the message a node just received and performed a calculation on for a later time, which is defined by your model for the processing time. I.e. the node "sends" / reschedules the message to itself for a later time.

Best regards

Andrei Palade

unread,
Apr 21, 2017, 11:36:15 AM4/21/17
to peerfac...@googlegroups.com
Hi Kalman,

Thank you for your answer. In this situation, would it be appropriate to use the system time to schedule an event at a later time? For example, I have a central node that needs to send a message to all the other nodes in the network. Each receiving node, needs to process this message and reply to the central node:

  1. // this handler exists on receiving (non-central) nodes
  2. handleSomeNewMessageFromCentralNode (Message newMessage) {
  3.  
  4. start = get system time
  5.  
  6. process the message
  7.  
  8. end = get system time
  9.  
  10. delay to process message = end - start
  11.  
  12. schedule event with delay {
  13. sendReply to the central node
  14. }
  15. }

would this be correct?

Thank you,

Andrei


--
You received this message because you are subscribed to a topic in the Google Groups "PeerfactSim.KOM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/peerfactsim-kom/lRmsITs4byg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to peerfactsim-kom+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Andrei

Kalman

unread,
Apr 23, 2017, 4:46:28 AM4/23/17
to PeerfactSim.KOM
Dear Andrei,

it is NOT recommended to use the system time at all. Please use the simulation time and have an appropriate computation time model for it.
The reason is that the system time is independent of the simulation time and also operating in a different realm, mixing them is hazardous.
I recommend that you write your own computation time model and derive from the problem size a specific time in simulation time that is added then to the processing time of the node.

Thus it would be:
    1. // this handler exists on receiving (non-central) nodes
    2. handleSomeNewMessageFromCentralNode (Message newMessage) {
    3.  
    1. delay = getProcessingTimeModel(newMessage)

    Andrei Palade

    unread,
    Apr 23, 2017, 6:11:52 AM4/23/17
    to peerfac...@googlegroups.com
    Hey Kalman,

    Thank you again for your reply. Could you please explain why is not appropriate? For example, if I use the same units (for example ms in system time) and ms in simulation time, why I can't schedule the event in the simulator with the delay of executing my process? Also, can you please explain why do you mean that they are operating in a different realm, and why is it hazardous? Can you give me an example?

    Thank you,
    Andrei

    --
    You received this message because you are subscribed to a topic in the Google Groups "PeerfactSim.KOM" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/peerfactsim-kom/lRmsITs4byg/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to peerfactsim-kom+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.



    --
    Andrei
    Reply all
    Reply to author
    Forward
    0 new messages