Last modified 6 years ago Last modified on 18/09/09 15:39:47

Single Machine

You may want to treat a single machine as a cluster with only one node. In that case, make sure the file /etc/4s-cluster contains just a name for the local machine (or localhost) and then read the Cluster section of this page. Otherwise...

Setting up

4s-backend-setup demo

If given just a KB name as an argument 4store will pick a sensible default for a lowend, single machine deployment (one node, two segments). You can also specify the cluster and segmentation values explicitly:

4s-backend-setup --node 0 --cluster 1 --segments 4 demo

The number of segments should be a power of 2, parallelisation depends on segmentation. As a rule of thumb try a power of 2 close to twice as many segments as there are physical CPUs or CPU cores on the system, but depending on the workload you may find less or more work better.

Starting and stopping

Unlike a typical database server, 4store doesn't (yet) provide a single process which makes all your databases constantly available. Instead a separate process looks after each database. You can start the backend server for your newly created database with

4s-backend demo

If for some reason you want to stop the server you can do so by sending a KILL signal to the process, e.g. with

pkill -f '^4s-backend demo$'

(NB. If testing changes to the backend server during software development you can use the -D flag to run the backend server without detaching it from the foreground. In this case errors are written as console output and you can stop the server by killing it with C.)


4s-cluster-create demo

You can specify a total number of segments for the clustered case, again as a rule of thumb try somewhere near twice the number of CPU cores in the entire cluster. The default is 32 (for an 8 node cluster with dual-core CPUs, but probably also a good starting point for a 4 node cluster with quad-core CPUs)

Starting and stopping

4s-cluster-start demo

4s-cluster-stop demo