[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Enable persistence in TC server  XML
Forum Index -> Terracotta Platform
Author Message
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

Hi,
I want to enable persistence in TC server(L2), Currently TC server is started with 512m heapsize but as soon data size reaches 500 MB, It crashes. Please tell me how to enable persistence in TC so that data can be persisted in the disk. Please point me to some code/tc-config.xml showing persistence mode.

steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

Which version of the software are you experimenting with?

The following turns on persistence (see the reference config dso/config-sample/tc-config-reference.xml for details on all the options).

<persistence>
<mode>permanent-store</mode>
</persistence>

I'm currious to know what you are doing because even in temporary swap mode the server shouldn't OOME except for under some pretty extreme conditions like sending all the 500 meg of data down in one transaction (sync block). Could you share a bit more about your app?

Want to post to this forum? Join the Terracotta Community
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

I am using terracotta 2.2.0
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

not able to post the messages
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

getting NullPointerException
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

getting NullPointerException
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

getting NPE while posting
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

can you try it with 2.2.1 and see if the problem goes away. It has some memory tuning and performance improvements.


Want to post to this forum? Join the Terracotta Community
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

I am using terracotta 2.2.0

Basically I am adding 10K strings of 1K length each (total 10M) into ArrayList/HashMap in 1 synchronized block. I don't add all 500MB data in one shot. I also tried 100k data in 1 synchronized block.

I have a sample program where I instruct "add" and that adds 10MB of data. When List/Map size grows to 500MB, tc server crashes while client is still alive on 256MB heapsize. HeapSize of TC server is 512MB.

I have tried both persistent mode, but in both scenario tc server crashes with Out Of Memory error.

Let me know How I can store 10 GB of data with limited heap size say 2GB. It will be great if you can send me some sample program which can hold huge amount of data.

I am a serious evalutator, I am planning a cluster of size atleast 500 nodes if everything goes fine.
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

Definitely upgrade to 2.2.1 stable. In the mean time I'm going to do some experimenting. I suspect this is about the combination of large ArrayLists and what we call literals (especially large onces. We deal with strings as literals).

We also have some optimizations for large strings that we aren't currently doing that we should be. I'll get someone to post back with more details. If you get time. Might be interesting to replace the ArrayList with a HashMap and see if the issue goes away. Then, instead of directly referencing large Strings from the array/map reference an object which references the String. This is just temporary while we put in the fix but it would help prove out that the problem is what I think it is.

If you can't get to the above, don't worry about it. We will.

Want to post to this forum? Join the Terracotta Community
Tim Eck

journeyman
[Avatar]
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline

I'm not entirely sure, but I think you the original poster is also involved in an off forum discussion about this issue.

The advice from Steve is sound, instead of storing the String references directly in the list, store the strings as fields of some other holder type, and place those holders in the list. The upgrade to 2.2.1 is a good idea (lots of good stuff in there), but it won't make the OutOfMemoryError go away.

I also opened a jira item to track this issue:
http://jira.terracotta.org/jira/browse/CDV-109
zeeiyer

consul

Joined: 05/24/2006 14:28:28
Messages: 493
Offline

Also to pass Java system properties - you have to pass these in with the fully qualified name – i.e. –Dcom.tc.l1.cachemanager.threshold=30 (not –Dl1.cachemanager.threshold). If you don't pass it in, the default for that property is 70 (i.e. cache evictor will kick in when heap utilization gets to 70%)

Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community
serveshp

neo

Joined: 01/31/2007 08:27:42
Messages: 8
Offline

not able to post the messages
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

Still having problems posting? Seems this forum software has issues with certain chars. In the short run might be easier to sign up for the tc-users email list. Or you can e-mail me steve at terracottatech dot com

Want to post to this forum? Join the Terracotta Community
jhartley

neo

Joined: 05/24/2006 14:24:55
Messages: 1
Offline

serveshp,

If you prefer to not sign up on the email lists that's fine. Then just contact Steve at the address he provided or support at terracottatech dot com - even using a anonymous mailinator account or whatever. If you could send us the NPE as well that would be really helpful. We're trying to track down the cause of this as it's incredibly frustrating for all of us. Thanks for your help and patience.
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team