Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Programmatically start/stop GSC and deploy PU

Hello,

We have a big machine with good amount of memory on it. My PU can not use more than my share of memory at any point in time. My PU has to process multiple sets of data and I have a good wide window for my PU to finish the job. So I'd like to start the space with the fixed amount of memory allocated to it. And then user space.clear after processing each set of data.

As the GC will not kick in, even after space is cleared, untill the total space is used off, I'm also considering the dynamic/programmatic start/stop and deploy of my PU. Kindly suggest how to start/stop gsc and deploy PU dynamically.

+Lakshmi

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2766]{quote}

asked 2008-12-15 12:00:03 -0500

lakshminc gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

You can control the garbage collection via the following parameters:
-XX:UseConcMarkSweepGC -XX:CMSIncrementalMode -XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=10 -XX:CMSIncrementalDutyCycle=50 -XX:ParallelGCThreads=8
-XX:UseParNewGC -Xmn50m -XX:MaxGCPauseMillis=1000 -XX:GCTimeRatio=4 -XX:DisableExplicitGC

You can deploy/un-deploy using the following:
http://www.gigaspaces.com/wiki/display/XAP66/pudeploy-GigaSpacesCLI
http://www.gigaspaces.com/docs/JavaDocOS6.6/org/openspaces/pu/container/servicegrid/deploy/Deploy.html

Shay

answered 2008-12-15 13:00:00 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Thanks Shay,

Java Options are going to help me to control the GC.

Another question:

We are still working on architecture...
We'd like to start 4 GSCs with equal memory and deploy the same PU in 4 GSCs. The PU has 2 polling containers(beans): one acts as feeder and the other as processor and an embedded space. Depening the volume of data, we'd like to have an external client initiate one or more PUs with different sets of data for parallel processing. External client will do this by placing appropriaye Marker data object in the respective(?) space. In case we have only one set of data external client will initiate only one PU on first GSC.

Kindly help clarify me the following:

1. Can I deploy same PU with embedded space in multiple GSCs and assume they are different spaces?
2. If YES can my external client push a Marker data object into a specific space (for instance space 1 on GSC1)?
3. If NO, is it good idea to give different URLs through property file to the same PU deployed in different containers?

Thanks,
Lakshmi

lakshminc gravatar imagelakshminc ( 2008-12-18 08:43:58 -0500 )edit
  1. Can I deploy same PU with embedded space in multiple GSCs and assume they are different spaces?

When deploying the PU in clustered mode using the partitioned schema- each partition will be a different space. You could configure the system to provision each partition into a different GSC using the "-max-instances-per-vm 1 -max-instances-per-machine 1" deploy options. In case you would like also to have backup you should use the partitioned-sync2backup cluster schema.

See below command for example how you can deploy your PU in clustered mode: gs pudeploy -cluster schema=partitioned-sync2backup total_members=2,1 -max-instances-per-vm 1 mypu.jar

With the above you will have 2 partitions with one backup for each partition (4 spaces total). You will need 4 GSCs to host this cluster in order each GSC will host a single space.

See mode at: http://www.gigaspaces.com/wiki/displa...

  1. If YES can my external client push a Marker data object into a specific space (for instance space 1 on GSC1)?

YES. This is the idea behind the @SpaceRouting method annotation. This method value hash code used to rout the operation (write , read or take) to a specific partition.
See: http://www.gigaspaces.com/wiki/displa...

  1. If NO, is it good idea to give different URLs through property file to the same PU deployed in different containers?

This is not the preferred way to solve scalability issues. We provide all this out of the box when deploying the PU in cluster mode.

Shay

shay hassidim gravatar imageshay hassidim ( 2008-12-20 09:59:01 -0500 )edit

Thanks Shay,

I have deployed my PU with partitioned-sync2backup on 4 containers with no backups.

Here are my container names: Processor_container1, Processor_container2, Processor_container3 and Processor_container4.

My external client has written a data object with RoutingIndex targetting specific container/space. Here is the behaviour in different attempts:

1st Round

Routing Index Data written to Container ========== ================= 1 2 2 3 3 4 4 1

2nd Round

Routing Index Data written to Container ========== ================== 1 2 2 3 3 4 4 1

So Container number is Routing Index + 1

3rd Round:

Routing Index Data written to Container ========== ======= ========== 0 1 1 2 2 3 3 4

Is this behaviour consistent and reliable?

lakshminc gravatar imagelakshminc ( 2008-12-26 12:40:00 -0500 )edit

Seems OK.
Make sure you make the routing field an Integer type.
See:
http://www.gigaspaces.com/wiki/display/SBP/High-AvailabilityandScalability#High-AvailabilityandScalability-Scalability

See the Load-Balancing Calculator.

Shay

shay hassidim gravatar imageshay hassidim ( 2008-12-26 12:44:05 -0500 )edit

Great!

This link confirms that my analysis is correct.

Thanks Shay

+Lakshmi

lakshminc gravatar imagelakshminc ( 2008-12-26 13:31:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2008-12-15 12:00:03 -0500

Seen: 488 times

Last updated: Dec 15 '08