Skip to content

Commit

Permalink
Adding a Production worthy sample configuration
Browse files Browse the repository at this point in the history
do a
   $ bin/voldemort-prod-server.sh config/prod_single_node_cluster
to get started
  • Loading branch information
vinothchandar committed Jun 4, 2013
1 parent 8efee8a commit ea7cc0c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -15,3 +15,5 @@ server.state
.idea
data/
META-INF/MANIFEST.MF
gc.log
voldsys$_*
26 changes: 26 additions & 0 deletions bin/voldemort-prod-server.sh
@@ -0,0 +1,26 @@
#!/bin/bash

#
# Copyright 2008-2013 LinkedIn, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

#
# Spin up the voldemort server(BDB-JE) with a production worthy JVM config
#
export VOLD_OPTS=" -server -Xms32684m -Xmx32684m -XX:NewSize=2048m -XX:MaxNewSize=2048m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=70 -XX:SurvivorRatio=2 -XX:+AlwaysPreTouch -XX:+UseCompressedOops -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime "
echo "WARNING: This setup spins up a kickass server for production/perftesting. Make SURE that you are running on a server class machine"
echo "Tip: Make sure you either disable swap or give your user permission to mlock the heap"
bin/voldemort-server.sh $@
12 changes: 12 additions & 0 deletions config/prod_single_node_cluster/config/cluster.xml
@@ -0,0 +1,12 @@
<cluster>
<name>myprodcluster</name>
<server>
<id>0</id>
<host>localhost</host>
<http-port>8081</http-port>
<socket-port>6666</socket-port>
<admin-port>7777</admin-port>
<partitions>0, 1</partitions>
</server>
</cluster>

33 changes: 33 additions & 0 deletions config/prod_single_node_cluster/config/server.properties
@@ -0,0 +1,33 @@
# The ID of *this* particular cluster node
node.id=0

# configs
admin.enable=true
admin.max.threads=40
bdb.cache.evictln=true
bdb.cache.size=20GB
bdb.checkpoint.interval.bytes=2147483648
bdb.checkpointer.off.batch.writes=true
bdb.cleaner.interval.bytes=15728640
bdb.cleaner.lazy.migration=false
bdb.cleaner.min.file.utilization=0
bdb.cleaner.threads=1
bdb.enable=true
bdb.evict.by.level=true
bdb.expose.space.utilization=true
bdb.lock.nLockTables=47
bdb.minimize.scan.impact=true
bdb.one.env.per.store=true
enable.server.routing=false
enable.verbose.logging=false
http.enable=true
nio.connector.selectors=50
num.scan.permits=2
request.format=vp3
restore.data.timeout.sec=1314000
scheduler.threads=24
slop.frequency.ms=300000
socket.enable=true
storage.configs=voldemort.store.bdb.BdbStorageConfiguration, voldemort.store.readonly.ReadOnlyStorageConfiguration
stream.read.byte.per.sec=209715200
stream.write.byte.per.sec=78643200
19 changes: 19 additions & 0 deletions config/prod_single_node_cluster/config/stores.xml
@@ -0,0 +1,19 @@
<stores>
<store>
<name>test</name>
<persistence>bdb</persistence>
<description>Test store</description>
<owners>harry@hogwarts.edu, hermoine@hogwarts.edu</owners>
<routing-strategy>consistent-routing</routing-strategy>
<routing>client</routing>
<replication-factor>1</replication-factor>
<required-reads>1</required-reads>
<required-writes>1</required-writes>
<key-serializer>
<type>string</type>
</key-serializer>
<value-serializer>
<type>string</type>
</value-serializer>
</store>
</stores>

0 comments on commit ea7cc0c

Please sign in to comment.