krishna rangaiah
2014-03-20 07:48:57 UTC
Hi Giovanni,
After seeing your answer, I wanted to confirm from you that, whether this
theory applicable only for the problem specified here (Video processing) or
will it apply to Jade in general?
Thanks,
Krishna.
After seeing your answer, I wanted to confirm from you that, whether this
theory applicable only for the problem specified here (Video processing) or
will it apply to Jade in general?
Thanks,
Krishna.
Send jade-develop mailing list submissions to
jade-develop at avalon.tilab.com
To subscribe or unsubscribe via the World Wide Web, visit
https://avalon.cselt.it/mailman/listinfo/jade-develop
or, via email, send a message with subject or body 'help' to
jade-develop-request at avalon.tilab.com
You can reach the person managing the list at
jade-develop-owner at avalon.tilab.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of jade-develop digest..."
1. R: jade multiple agents problem (Caire Giovanni)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Mar 2014 18:48:16 +0100
From: Caire Giovanni <giovanni.caire at telecomitalia.it>
To: Sudarshan Seshadri <s.sudarshan.fb at gmail.com>,
"jade-develop at avalon.tilab.com" <jade-develop at avalon.tilab.com>
Subject: [jade-develop] R: jade multiple agents problem
<51508CA9C4AE774DAC3FC6B8F0E5A538473C21D8B4 at GRFMBX707BA020.griffon.local>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
As was already pointed out it is very important to understand what the
bottleneck is in your case.
- If the bottleneck is the CPU then take into account the following
consideration: a single JVM typically is able to use 1 CPU --> Even if your
machine has 4 CPU, if all your agents run in the same container (1
container <-- --> 1 JVM) they are actually sharing a single CPU --> 4
agents, 8 agents or 16 agents make no difference at all. What you should do
in this case is running a distributed platform with 4 containers and spread
your 16 agents 4 per container. In this way you should be able to exploit
the full computational power of your machine.
- If the bottleneck is something else (e.g. disk access) I'm afraid you
should distribute your agents on different hosts.
Bye,
Giovanni
jade-develop-bounces at avalon.tilab.com] Per conto di Sudarshan Seshadri
Inviato: marted? 18 marzo 2014 19:09
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] jade multiple agents problem
Is it really possible to run multiple agents doing independent tasks
simultaneously on a single computer? If so please suggest some methods. I
am able to run multiple agents simultaneously, but the execution time
remains the same regardless of the number of agents am running to complete
a work, If the same work is split among many agents, running them parallely
would yield a lesser execution time according to logic, but it comes out to
the same old execution time if I hadn't used those additional agents and
not divided the work further.
Total blocks = 16
Total agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 sec)
Total blocks = 16
Total agents = 8
Blocks per agent = 2
Expected Execution time = 2 sec
Actual Execution time = 4 sec ( assuming each block takes 1 sec)
Total blocks = 16
Total agents = 16
Blocks per agent = 1
Expected Execution time = 1 sec
Actual Execution time = 4 sec ( assuming each block takes 1 sec)
I checked out that all the agents perform their allotted blocks
successfully. No agent's work is dependent on the other, all the tasks are
independent since a unique block among the 16 gets allocated to each agent.
No problem occurs while executing the tasks of the agents. But I keep
getting the same execution time as mentioned above. Is there a solution to
this? I also tried using 16 duplicate copies of the same image and assigned
the blocks from each copy to the agents to tackle synchronization problem.
But still faced the same issue. I need to solve this since my project is
about multi-agent systems. Kindly guide me through this.
On Tue, Mar 18, 2014 at 8:53 PM, Didac Gil de la Iglesia <
But still, even if they are different images, they may be in the same
disk, coming through the same buss of data, and using the same I/O channel,
and may they are even in the same hard drive. These are all aspects slower
than a CPU.
I think you could consider the Computer Architecture and try to analyze
how the data flow and execution schedules may be before you try to
understand the agent processes themselves.
Didac Gil de la Iglesia
didacgil9 at gmail.com<mailto:didacgil9 at gmail.com>
On 18 mar 2014, at 16:19, Sudarshan Seshadri <s.sudarshan.fb at gmail.com
The tasks taken up by the agents are independent since each agent gets
unique blocks out of the 16 to process so it doesn't require results from
blocks that were executed by another agent. Ya I thought synchronization
might be a problem, but I tried on separate image files by creating 16
duplicate copies of the image and assigned a unique copy to each agent (
assuming a maximum of 16 agents so 16 duplicate images). But the same
execution time occurred even after that so I thought synchronization
wouldn't be a problem there.
On Tue, Mar 18, 2014 at 8:41 PM, Didac Gil de la Iglesia <
Is your Virtual Machine using the 4CPUs or is it using only 1?
Having more agents does not always mean that it will go faster to process
the tasks. Usually, we say that 1 CPU has a number of instructions per
second that can execute. And, it doesn't matter if these instructions are
related to code for 1 agent or for 100 agents.
So, if you have only 1 CPU, you should not expect to go faster with more
agents, but actually the opposite, I would say. Because the CPU may be
changing the context based on the scheduler algorithm.
These are actually Computer Architectures aspects. Also, consider things
such as: 1 Agent, no need for coordination of tasks. Multiple agents, time
required to assign tasks to the agents. Are the tasks independent, or do
agents require results from blocks that were executed by another agent?
You mentioned that the agents access the same image file? I would assume
that the file cannot be accessed (read) by all the agents at the same time,
so the agents will have to wait in a line to read the parts they are
interested on (block).
So, I think your problem is actually a scheduling issue, and not only an
agent issue.
Didac Gil de la Iglesia
didacgil9 at gmail.com<mailto:didacgil9 at gmail.com>
On 18 mar 2014, at 15:57, Sudarshan Seshadri <s.sudarshan.fb at gmail.com
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 8 agents run in parallel but total time taken = 4 sec (again same
results :( it should be 2 seconds )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:24 PM, Sudarshan Seshadri <
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel but total time taken = 4 sec (again same
results :( )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:23 PM, Sudarshan Seshadri <
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel but total time taken = 4 sec (again same
results :( )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:09 PM, Miquel Vall Boladeras <mivabo at hotmail.com
Well, just try to be sure, what I want to say is that word parallel in
computing is always pseudo-concurrency, unless you are using multicore and
can manage it or running more than one processor with agents distributed.
Agents might be assigned a thread or a time in a main thread, and
(agents)x(block) always is equal to 16, in your case, and then always 16
units of time.
Regards,
Miquel
s.sudarshan.fb at gmail.com>]
Enviado el: martes, 18 de marzo de 2014 15:22
Para: Miquel Vall Boladeras
Asunto: Re: [jade-develop] Fwd: jade multiple agents problem
Ya they run on the same virtual machine and in the same processor. The
basic logic behind is, the more agents I use for sharing the work i.e.
reducing the number of blocks to be processed by each agent and executing
them in parallel, then the execution time to process those blocks should
reduce right? But am getting the same execution time, despite using more
agents to lessen the work load by assigning blocks to them and running them
in parallel.
On Tue, Mar 18, 2014 at 7:45 PM, Miquel Vall Boladeras <mivabo at hotmail.com
Hi,
I do not know alot about last releases of Jade, but when you are
multiplying agents, do they run in the same Virtual Machine? In the same
processor? Did you check tasks scheduling load and deadlines?
Hope that can help.
With kind regards
Miquel
s.sudarshan.fb at gmail.com>]
Enviado el: lunes, 17 de marzo de 2014 15:21
Para: jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
Asunto: [jade-develop] Fwd: jade multiple agents problem
Please I need an urgent solution to this problem!
I am using jade agents for video processing and am facing an issue with
multiple agents. I am actually using agents to process blocks from an image
file. There are 16 blocks in my image. I have initially used 4 agents in my
program taking up 4 blocks each for processing and I calculate the
execution time by running the 4 agents in parallel. When I use 8 agents,
assigning 2 blocks each and run them in parallel, I get a more or less the
same execution time. This occurs even for 16 agents taking one block for
processing and running in parallel.
I thought synchronization could be a problem since all agents are
accessing the same image file, but after giving duplicate copies of the
image to each agent and running them, the same problem occurs. So please
help me with this issue.
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://avalon.cselt.it/pipermail/jade-develop/attachments/20140319/abec19b4/attachment.html
------------------------------
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com
https://avalon.cselt.it/mailman/listinfo/jade-develop
End of jade-develop Digest, Vol 134, Issue 21
*********************************************
jade-develop at avalon.tilab.com
To subscribe or unsubscribe via the World Wide Web, visit
https://avalon.cselt.it/mailman/listinfo/jade-develop
or, via email, send a message with subject or body 'help' to
jade-develop-request at avalon.tilab.com
You can reach the person managing the list at
jade-develop-owner at avalon.tilab.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of jade-develop digest..."
1. R: jade multiple agents problem (Caire Giovanni)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Mar 2014 18:48:16 +0100
From: Caire Giovanni <giovanni.caire at telecomitalia.it>
To: Sudarshan Seshadri <s.sudarshan.fb at gmail.com>,
"jade-develop at avalon.tilab.com" <jade-develop at avalon.tilab.com>
Subject: [jade-develop] R: jade multiple agents problem
<51508CA9C4AE774DAC3FC6B8F0E5A538473C21D8B4 at GRFMBX707BA020.griffon.local>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
As was already pointed out it is very important to understand what the
bottleneck is in your case.
- If the bottleneck is the CPU then take into account the following
consideration: a single JVM typically is able to use 1 CPU --> Even if your
machine has 4 CPU, if all your agents run in the same container (1
container <-- --> 1 JVM) they are actually sharing a single CPU --> 4
agents, 8 agents or 16 agents make no difference at all. What you should do
in this case is running a distributed platform with 4 containers and spread
your 16 agents 4 per container. In this way you should be able to exploit
the full computational power of your machine.
- If the bottleneck is something else (e.g. disk access) I'm afraid you
should distribute your agents on different hosts.
Bye,
Giovanni
jade-develop-bounces at avalon.tilab.com] Per conto di Sudarshan Seshadri
Inviato: marted? 18 marzo 2014 19:09
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] jade multiple agents problem
Is it really possible to run multiple agents doing independent tasks
simultaneously on a single computer? If so please suggest some methods. I
am able to run multiple agents simultaneously, but the execution time
remains the same regardless of the number of agents am running to complete
a work, If the same work is split among many agents, running them parallely
would yield a lesser execution time according to logic, but it comes out to
the same old execution time if I hadn't used those additional agents and
not divided the work further.
Total blocks = 16
Total agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 sec)
Total blocks = 16
Total agents = 8
Blocks per agent = 2
Expected Execution time = 2 sec
Actual Execution time = 4 sec ( assuming each block takes 1 sec)
Total blocks = 16
Total agents = 16
Blocks per agent = 1
Expected Execution time = 1 sec
Actual Execution time = 4 sec ( assuming each block takes 1 sec)
I checked out that all the agents perform their allotted blocks
successfully. No agent's work is dependent on the other, all the tasks are
independent since a unique block among the 16 gets allocated to each agent.
No problem occurs while executing the tasks of the agents. But I keep
getting the same execution time as mentioned above. Is there a solution to
this? I also tried using 16 duplicate copies of the same image and assigned
the blocks from each copy to the agents to tackle synchronization problem.
But still faced the same issue. I need to solve this since my project is
about multi-agent systems. Kindly guide me through this.
On Tue, Mar 18, 2014 at 8:53 PM, Didac Gil de la Iglesia <
But still, even if they are different images, they may be in the same
disk, coming through the same buss of data, and using the same I/O channel,
and may they are even in the same hard drive. These are all aspects slower
than a CPU.
I think you could consider the Computer Architecture and try to analyze
how the data flow and execution schedules may be before you try to
understand the agent processes themselves.
Didac Gil de la Iglesia
didacgil9 at gmail.com<mailto:didacgil9 at gmail.com>
On 18 mar 2014, at 16:19, Sudarshan Seshadri <s.sudarshan.fb at gmail.com
The tasks taken up by the agents are independent since each agent gets
unique blocks out of the 16 to process so it doesn't require results from
blocks that were executed by another agent. Ya I thought synchronization
might be a problem, but I tried on separate image files by creating 16
duplicate copies of the image and assigned a unique copy to each agent (
assuming a maximum of 16 agents so 16 duplicate images). But the same
execution time occurred even after that so I thought synchronization
wouldn't be a problem there.
On Tue, Mar 18, 2014 at 8:41 PM, Didac Gil de la Iglesia <
Is your Virtual Machine using the 4CPUs or is it using only 1?
Having more agents does not always mean that it will go faster to process
the tasks. Usually, we say that 1 CPU has a number of instructions per
second that can execute. And, it doesn't matter if these instructions are
related to code for 1 agent or for 100 agents.
So, if you have only 1 CPU, you should not expect to go faster with more
agents, but actually the opposite, I would say. Because the CPU may be
changing the context based on the scheduler algorithm.
These are actually Computer Architectures aspects. Also, consider things
such as: 1 Agent, no need for coordination of tasks. Multiple agents, time
required to assign tasks to the agents. Are the tasks independent, or do
agents require results from blocks that were executed by another agent?
You mentioned that the agents access the same image file? I would assume
that the file cannot be accessed (read) by all the agents at the same time,
so the agents will have to wait in a line to read the parts they are
interested on (block).
So, I think your problem is actually a scheduling issue, and not only an
agent issue.
Didac Gil de la Iglesia
didacgil9 at gmail.com<mailto:didacgil9 at gmail.com>
On 18 mar 2014, at 15:57, Sudarshan Seshadri <s.sudarshan.fb at gmail.com
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 8 agents run in parallel but total time taken = 4 sec (again same
results :( it should be 2 seconds )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:24 PM, Sudarshan Seshadri <
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel but total time taken = 4 sec (again same
results :( )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:23 PM, Sudarshan Seshadri <
Acutally what am doing is
Total number of blocks = 16
Number of agents = 4
Blocks per agent = 4
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel so total time taken = 4 sec
Now
Total number of blocks = 16
Number of agents = 8
Blocks per agent = 2
Execution time = 4 sec ( assuming each block takes 1 second to process)
All 4 agents run in parallel but total time taken = 4 sec (again same
results :( )
It would be helpful if you could you explain a bit more on what you have
mentioned like agent distribution and pseudo concurrency :) My computer's
CPU has 4 cores basically, so is there a solution to this problem? Can I
achieve a lesser execution time, when running with more agents ?
On Tue, Mar 18, 2014 at 8:09 PM, Miquel Vall Boladeras <mivabo at hotmail.com
Well, just try to be sure, what I want to say is that word parallel in
computing is always pseudo-concurrency, unless you are using multicore and
can manage it or running more than one processor with agents distributed.
Agents might be assigned a thread or a time in a main thread, and
(agents)x(block) always is equal to 16, in your case, and then always 16
units of time.
Regards,
Miquel
s.sudarshan.fb at gmail.com>]
Enviado el: martes, 18 de marzo de 2014 15:22
Para: Miquel Vall Boladeras
Asunto: Re: [jade-develop] Fwd: jade multiple agents problem
Ya they run on the same virtual machine and in the same processor. The
basic logic behind is, the more agents I use for sharing the work i.e.
reducing the number of blocks to be processed by each agent and executing
them in parallel, then the execution time to process those blocks should
reduce right? But am getting the same execution time, despite using more
agents to lessen the work load by assigning blocks to them and running them
in parallel.
On Tue, Mar 18, 2014 at 7:45 PM, Miquel Vall Boladeras <mivabo at hotmail.com
Hi,
I do not know alot about last releases of Jade, but when you are
multiplying agents, do they run in the same Virtual Machine? In the same
processor? Did you check tasks scheduling load and deadlines?
Hope that can help.
With kind regards
Miquel
s.sudarshan.fb at gmail.com>]
Enviado el: lunes, 17 de marzo de 2014 15:21
Para: jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
Asunto: [jade-develop] Fwd: jade multiple agents problem
Please I need an urgent solution to this problem!
I am using jade agents for video processing and am facing an issue with
multiple agents. I am actually using agents to process blocks from an image
file. There are 16 blocks in my image. I have initially used 4 agents in my
program taking up 4 blocks each for processing and I calculate the
execution time by running the 4 agents in parallel. When I use 8 agents,
assigning 2 blocks each and run them in parallel, I get a more or less the
same execution time. This occurs even for 16 agents taking one block for
processing and running in parallel.
I thought synchronization could be a problem since all agents are
accessing the same image file, but after giving duplicate copies of the
image to each agent and running them, the same problem occurs. So please
help me with this issue.
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://avalon.cselt.it/pipermail/jade-develop/attachments/20140319/abec19b4/attachment.html
------------------------------
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com
https://avalon.cselt.it/mailman/listinfo/jade-develop
End of jade-develop Digest, Vol 134, Issue 21
*********************************************
--
I am Only One, but still I am one; I cannot do everything, but still I can
do something; and because I cannot do everything, I will not Refuge to do
something that I CAN DO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140320/c6847944/attachment-0001.html>
I am Only One, but still I am one; I cannot do everything, but still I can
do something; and because I cannot do everything, I will not Refuge to do
something that I CAN DO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140320/c6847944/attachment-0001.html>