| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 13/04/2009 11:57:49
|
juno.rr
Joined: 13/04/2009 09:39:11
Messages: 2
Offline
|
Hello. I am thinking of using Space4j in a project, but I have a doubt. Already search on google but without success. What happens when the data size becomes larger than the RAM size? StackOverflowError?
Thanks.
Sorry my bad english.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 13/04/2009 12:04:02
|
saoj
Joined: 05/09/2008 13:26:12
Messages: 46
Offline
|
You get a OutOfMemoryError and you have to increase your heap size with the -Xms options or eventually your physical RAM. Google about Java Heap size command options.
Amount of RAM should not be a problem, unless you have a really huge database. In this case you should probably use a regular relational database.
-Sergio
|
-Sergio Oliveira Junior |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 13/04/2009 14:27:59
|
juno.rr
Joined: 13/04/2009 09:39:11
Messages: 2
Offline
|
Ok. Thank you very much, Sergio.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/10/2010 10:31:55
|
skaak
Joined: 26/10/2010 10:26:48
Messages: 2
Offline
|
Hi, just a follow up on that. If I use a cluster, does it increase the RAM available to space4j?
I haven't used it yet, but it would be nice if I can increase memory by adding nodes. I suppose that the size of the repository, if I can call it that, will rather be limited by the node with the smallest RAM?
Thanks
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/10/2010 12:18:32
|
saoj
Joined: 05/09/2008 13:26:12
Messages: 46
Offline
|
skaak wrote:Hi, just a follow up on that. If I use a cluster, does it increase the RAM available to space4j?
No. A cluster gives you replication. It is like a RAID for storage. It is good for load balance, fault tolerance and asynchronous snapshots.
skaak wrote:
I haven't used it yet, but it would be nice if I can increase memory by adding nodes. I suppose that the size of the repository, if I can call it that, will rather be limited by the node with the smallest RAM?
The memory will be limited by the amount of RAM of the MASTER node. If the SLAVE nodes have more memory, that will not be used because modifications (WRITE) commands always happen first in the MASTER. If a slave have less memory, you may end up getting an OutOfMemoryException in the node, but that won't stop the whole system.
A best practice when using any cluster is to keep your system homogenous, in other words, to keep the machines in cluster as similar as possible.
If you need more memory you need more RAM, unless your JVM is not using all the available memory RAM from your machine. In that case you need to use the -Xms jvm options.
|
-Sergio Oliveira Junior |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/10/2010 12:43:13
|
skaak
Joined: 26/10/2010 10:26:48
Messages: 2
Offline
|
Thanks for the quick reply.
Does a cluster then improve performance?
Regards
skaak
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/10/2010 13:17:34
|
saoj
Joined: 05/09/2008 13:26:12
Messages: 46
Offline
|
skaak wrote:Thanks for the quick reply.
Does a cluster then improve performance?
Regards
skaak
Depends on how you see it.
It increases performance because it gives you LOAD BALANCE and ASYNCHRONOUS SNAPSHOTS.
But it also decreases performance due to replication of the commands to all nodes over the network.
But performance is always RELATIVE. You will still be very fast. As fast as or faster than related databases for example.
Check the stress test examples with cluster then you can draw your own conclusions.
This message was edited 1 time. Last update was at 26/10/2010 13:19:29
|
-Sergio Oliveira Junior |
|
|
 |
|
|