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

Ask Your Question

SLA Problem In Local Machine

Hi ! I'm running lots of pu's in my local machine, 4 grid nodes, 1 master, 2 wokers and a mirror. Each time the mirror starts to inserting records in the database, it does some and suddenly it stops inserting records. Like 10 minutes after, it keeps going with more records. Coincidently I see in the SLA Threshold Event that there is the CPU Breached and then cleared (0.999666 is above the high limit which is 0.99)

Are both things related ? Like when it breaches the cpu threshold it will hold the job to continue later when the problem is cleared ? Also, there is any way to eliminate this threshold ? Will this same thing happen when I deploy this to cloud ?

Thanks !

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

asked 2009-04-29 15:38:05 -0500

pruggia 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

It might.
Do u have the application running and mirror writing to the database correctly while the machine have spare CPU?

U can turn off the CPU monitoring via the gigaspaces root/config/services/services.config.

On the cloud you will have dedicated machine for the mirror or run it with the database server on the same machine (recommended approach). So it will have plenty of spare CPU.


answered 2009-04-29 17:04:00 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Changing the services.config file removed the SLA events, but the mirror still works in the same way. A bunch of registers (for example 30.000), loooong time of nothing, and then the rest (like 80.000 more). It eventually writes all the records, but it takes an awful lot of time (more than 10 minutes) to start writing again after it stops the first time. Every time I run it, different errors occur, like the grid manager saying it has lost some containers, or an error about the lease manager being discarded. May be it's too much to run in my local machine, but its not that much data that i'm playing with. May be something is missing in my config, or something is not needed. My data grid is configured in this way: +<os-core:space id="space" url="/./${dataGridName}" +="" +="" mirror="true">+ + <os-core:filter-provider ref="serviceExporter"/>+ + <os-core:properties>+ + <props>+ + <prop key="cluster-config.mirror-service.url">jini://*/mirror-service_container/mirror-service</prop>+ + <prop key="cluster-config.mirror-service.bulk-size">100</prop>+ + <prop key="cluster-config.mirror-service.interval-millis">2000</prop>+ + <prop key="cluster-config.mirror-service.interval-opers">100</prop>+ + </props>+ + </os-core:properties>+ +</os-core:space>+ And my mirror is: +<os-core:space id="space" url="/./mirror-service" schema="mirror" +="" +="" external-data-source="hibernateDataSource"/>+ I usually run my grid as sync partitioned, 2 nodes with 1 backup per node. Tried with one node also, same thing happened.

Thanks !

pruggia gravatar imagepruggia ( 2009-04-30 08:32:28 -0500 )edit

Also, in the documentation, the space gets configured as persistent and an external data source is configured.
That is just if I want to load the space from the database right ?

pruggia gravatar imagepruggia ( 2009-04-30 08:35:51 -0500 )edit

If you are using the Mirror service the data grid should be configured to have read-only EDS usage mode. This will make sure write/update/delete operations will be delegated into the database via the Mirror only and not also via the data-grid: {code} <os-core:space id="space" url="/./space" schema="persistent" mirror="true" external-data-source="hibernateDataSource"> <os-core:properties> <props> <prop key="space-config.engine.cache_policy">1</prop> <prop key="space-config.external-data-source.usage">read-only</prop> <prop key="cluster-config.cache-loader.external-data-source">true</prop> <prop key="cluster-config.cache-loader.central-data-source">true</prop>
<prop key="cluster-config.mirror-service.url">jini://*/mirror-service_container/mirror-service</prop> <prop key="cluster-config.mirror-service.bulk-size">100</prop> <prop key="cluster-config.mirror-service.interval-millis">2000</prop> <prop key="cluster-config.mirror-service.interval-opers">100</prop> </props> </os-core:properties> </os-core:space>

<bean id="hibernateDataSource" class="org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource"> <property name="sessionFactory" ref="sessionFactory"/> </bean> {code}

See more here: http://www.gigaspaces.com/wiki/displa...http://www.gigaspaces.com/wiki/displa...


shay hassidim gravatar imageshay hassidim ( 2009-04-30 08:57:04 -0500 )edit

Sorry to be insistent, I just don't understand a detail. Why do I need to configure a connection to an external data source for my grid if I don't want to read nor write to it ? I just want my objects to rest in peace in the database after being written to DB by the mirror. What is gigaspaces doing under the covers with the connection I'm giving to him ? Thanks and sorry again

pruggia gravatar imagepruggia ( 2009-04-30 09:25:00 -0500 )edit

Thank you for this. In such a case the data grid space schema should be the default and there is no need to configure it to have an external data source.

The external data source used by the data grid to initialize itself and read / write to database in case u are running in LRU and read-write usage mode.


shay hassidim gravatar imageshay hassidim ( 2009-04-30 09:37: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

1 follower


Asked: 2009-04-29 15:38:05 -0500

Seen: 47 times

Last updated: Apr 29 '09