Load-balancing and process migration

_ Is there a tool for estimate the cpu’s usage of the process ?

_Can I dump the memory segment of the process ? (without sh_mem)

“Ricardo Az” <ricardo.azevedo@terra.com.br> wrote in message
news:9od6tu$2gr$1@inn.qnx.com

_ Is there a tool for estimate the cpu’s usage of the process ?

Get sysmon from QDN (contributed software section)

_Can I dump the memory segment of the process ? (without sh_mem)

Yes, check out dumper utility.

Ricardo Az <ricardo.azevedo@terra.com.br> wrote:

_ Is there a tool for estimate the cpu’s usage of the process ?

sysmon as noted will track who is using CPU now.

If this is a program that will run & exit, the time utility might work:
e.g. “time ls /bin”

If you’re wondering what will use CPU time in the process, you might
look at sample & wprof.

If you’re wondering how much CPU time a process has used, “sin ti”
will give that information.

_Can I dump the memory segment of the process ? (without sh_mem)

Someone suggested dumper – but it only dumps a process as it
dies. What are you trying to achieve here?

-David

QNX Training Services
dagibbs@qnx.com

David Gibbs <dagibbs@qnx.com> wrote:

_Can I dump the memory segment of the process ? (without sh_mem)

Someone suggested dumper – but it only dumps a process as it
dies. What are you trying to achieve here?

Ah, I now check the title… “load balancing and process migration”.

Hm… assuming you are looking at the ability to “freeze” a process,
then re-start it on another machine.

That gets messier – I don’t think there is any support for
doing something like this, and even if there were, there are
big issues – such as what do fds refer to? The pid/fd pairing/mapping
info, just for instance, is kept in Proc, not in the processes data
space, and among other things, this new process will be running with
a different Proc on the new node, and most likely a new pid as well.

I think to do something like this, you’re going to need the intelligence
inside the process to be migrated – you’ll have to send it a “please
migrate” message (or signal, or something), it will get that, save its
state, start a new one on the new node, with (say) a command line option
telling it to “restore” its state, etc.

That is, you’ll have to write save & restore routines yourself – and
I don’t think you can just copy the contents of memory, this will have
to include things like fds to open, names to attach, possibly vcs to
create, proxies & timers to attach, etc.

Also, if this is a server of some sort, you’ll need a mechanism for the
clients to find the new version…

-David

QNX Training Services
dagibbs@qnx.com

Do not will be so slow the seek-time in fds ?
´´
I would like to build a real-time parallel programs, for neural-networks and
3d render.
Ricardo Az : ricardo.azevedo@terra.com.br

“David Gibbs” <dagibbs@qnx.com> escreveu na mensagem
news:9odeas$3ag$5@nntp.qnx.com

David Gibbs <> dagibbs@qnx.com> > wrote:

_Can I dump the memory segment of the process ? (without sh_mem)

Someone suggested dumper – but it only dumps a process as it
dies. What are you trying to achieve here?

Ah, I now check the title… “load balancing and process migration”.

Hm… assuming you are looking at the ability to “freeze” a process,
then re-start it on another machine.

That gets messier – I don’t think there is any support for
doing something like this, and even if there were, there are
big issues – such as what do fds refer to? The pid/fd pairing/mapping
info, just for instance, is kept in Proc, not in the processes data
space, and among other things, this new process will be running with
a different Proc on the new node, and most likely a new pid as well.

I think to do something like this, you’re going to need the intelligence
inside the process to be migrated – you’ll have to send it a “please
migrate” message (or signal, or something), it will get that, save its
state, start a new one on the new node, with (say) a command line option
telling it to “restore” its state, etc.

That is, you’ll have to write save & restore routines yourself – and
I don’t think you can just copy the contents of memory, this will have
to include things like fds to open, names to attach, possibly vcs to
create, proxies & timers to attach, etc.

Also, if this is a server of some sort, you’ll need a mechanism for the
clients to find the new version…

-David

QNX Training Services
dagibbs@qnx.com

“Ricardo Az” <ricardo.azevedo@terra.com.br> wrote in message
news:9ofvde$n9m$1@inn.qnx.com

Do not will be so slow the seek-time in fds ?
´´
I would like to build a real-time parallel programs, for neural-networks
and
3d render.
Ricardo Az : > ricardo.azevedo@terra.com.br

Then dumping memory is not the way to go.
You can use messaging to pass data from program to program
(and across the network), or if the data is too big use shared memory.



“David Gibbs” <> dagibbs@qnx.com> > escreveu na mensagem
news:9odeas$3ag$> 5@nntp.qnx.com> …
David Gibbs <> dagibbs@qnx.com> > wrote:

_Can I dump the memory segment of the process ? (without sh_mem)

Someone suggested dumper – but it only dumps a process as it
dies. What are you trying to achieve here?

Ah, I now check the title… “load balancing and process migration”.

Hm… assuming you are looking at the ability to “freeze” a process,
then re-start it on another machine.

That gets messier – I don’t think there is any support for
doing something like this, and even if there were, there are
big issues – such as what do fds refer to? The pid/fd pairing/mapping
info, just for instance, is kept in Proc, not in the processes data
space, and among other things, this new process will be running with
a different Proc on the new node, and most likely a new pid as well.

I think to do something like this, you’re going to need the intelligence
inside the process to be migrated – you’ll have to send it a “please
migrate” message (or signal, or something), it will get that, save its
state, start a new one on the new node, with (say) a command line option
telling it to “restore” its state, etc.

That is, you’ll have to write save & restore routines yourself – and
I don’t think you can just copy the contents of memory, this will have
to include things like fds to open, names to attach, possibly vcs to
create, proxies & timers to attach, etc.

Also, if this is a server of some sort, you’ll need a mechanism for the
clients to find the new version…

-David

QNX Training Services
dagibbs@qnx.com