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

Ask Your Question
0

Slow write to persistent space

We have a persistent space, that is bombarded with around 90000 records in one go. While write to space is really fast, data doesn't appear in the database a really long time. During this period between when data is in space, and not in database, this space's processing unit keeps issuing select statements to the database.

We are using a hibernate datasource to access sybase database.

Why are these select statements being issued? How can this be avoided to make the process faster?

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

asked 2011-07-12 23:19:15 -0500

asirohi 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

Are you running in ALLINCACHE or LRU mode?
Does your application execute queries using readMultiple? or do you use read / readById?
How do you set the primary key value? Do you use database sequence or you set it yourself (placed the object ID yourself or let hibernate to get it from the DB)?
Shay

answered 2011-07-13 07:14:47 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Shay,

Are you running in ALL_IN_CACHE or LRU mode? ALL_IN_CACHE Does your application execute queries using readMultiple? or do you use read / readById? I am concerned about the performance of write operations. Writes to persistence space take a long time to show up in database. How do you set the primary key value? Do you use database sequence or you set it yourself (placed the object ID yourself or let hibernate to get it from the DB)? Primary key is String field which we set ourselves.

Best, Ash

asirohi gravatar imageasirohi ( 2011-07-14 03:02:03 -0500 )edit

When running in ALLINCACHE the space does not execute any select statements against the database.
How many partitions you have? You can boost the write activity by running more partitions. This will allow GigaSpaces data grid to have more parallel activity against the mirror that will allow it to have parallel activity against the database.
How complex is your model? Any chance the hibernate mapping is not the issue? Can you post it?
How big are the objects you write?

Shay

shay hassidim gravatar imageshay hassidim ( 2011-07-14 05:02:46 -0500 )edit

Concern is that it takes about 30 mins before the write to database begins. So time taken to write to database = time taken to write to persistent space + ~ 30 mins + time taken to write to database. During these 30 mins, the pu keeps issuing select statements.

My question is - can this 30 min of select statements be eliminated? if yes, how? if no, what else can be done to make the process faster?

asirohi gravatar imageasirohi ( 2011-07-14 05:53:09 -0500 )edit

Our mapping is fairly straight forward, and not complex at all.

We have object A that contains List of object B. The annotation on List of B looks like @OneToMany @JoinColumn(name = "listOfB", nullable = true).

We using sybase, and jconnect.

Edited by: A Sirohi on Jul 14, 2011 6:15 AM

asirohi gravatar imageasirohi ( 2011-07-14 06:15:13 -0500 )edit

Have you changed the mirror replication settings?
By default the replication into the mirror will happen within few seconds.
What are the values you set for :
cluster-config.mirror-service.bulk-size
cluster-config.mirror-service.interval-millis
cluster-config.mirror-service.interval-opers

Shay

shay hassidim gravatar imageshay hassidim ( 2011-07-14 06:36:19 -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

Stats

Asked: 2011-07-12 23:19:15 -0500

Seen: 107 times

Last updated: Jul 13 '11