Skip to content

Instantly share code, notes, and snippets.

@lucaspiller
Created February 28, 2011 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucaspiller/847756 to your computer and use it in GitHub Desktop.
Save lucaspiller/847756 to your computer and use it in GitHub Desktop.
Riak config
$ cat /etc/riak/app.config
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
%% Riak Core config
{riak_core, [
%% Default location of ringstate
{ring_state_dir, "/var/lib/riak/ring"},
%% http is a list of IP addresses and TCP ports that the Riak
%% HTTP interface will bind.
{http, [ {"127.0.0.1", 8098 } ]},
%% https is a list of IP addresses and TCP ports that the Riak
%% HTTPS interface will bind.
%{https, [{ "127.0.0.1", 8098 }]},
%% default cert and key locations for https can be overridden
%% with the ssl config variable
%{ssl, [
% {certfile, "etc/cert.pem"},
% {keyfile, "etc/key.pem"}
% ]},
%% riak_handoff_port is the TCP port that Riak uses for
%% intra-cluster data handoff.
{handoff_port, 8099 },
{default_bucket_props, [{n_val,3},
{allow_mult,false},
{last_write_wins,false},
{precommit, []},
{postcommit, []},
{chash_keyfun, {riak_core_util, chash_std_keyfun}},
{linkfun, {modfun, riak_kv_wm_link_walker, mapreduce_linkfun}}
]}
]},
%% Riak KV config
{riak_kv, [
%% Storage_backend specifies the Erlang module defining the storage
%% mechanism that will be used on this node.
{storage_backend, riak_kv_bitcask_backend},
%% pb_ip is the IP address that the Riak Protocol Buffers interface
%% will bind to. If this is undefined, the interface will not run.
{pb_ip, "127.0.0.1" },
%% pb_port is the TCP port that the Riak Protocol Buffers interface
%% will bind to
{pb_port, 8087 },
%% raw_name is the first part of all URLS used by the Riak raw HTTP
%% interface. See riak_web.erl and raw_http_resource.erl for
%% details.
%{raw_name, "riak"},
%% mapred_name is URL used to submit map/reduce requests to Riak.
{mapred_name, "mapred"},
%% directory used to store a transient queue for pending
%% map tasks
{mapred_queue_dir, "/var/lib/riak/mr_queue" },
%% Each of the following entries control how many Javascript
%% virtual machines are available for executing map, reduce,
%% pre- and post-commit hook functions.
{map_js_vm_count, 8 },
{reduce_js_vm_count, 6 },
{hook_js_vm_count, 2 },
%% Number of items the mapper will fetch in one request.
%% Larger values can impact read/write performance for
%% non-MapReduce requests.
{mapper_batch_size, 5},
%% js_max_vm_mem is the maximum amount of memory, in megabytes,
%% allocated to the Javascript VMs. If unset, the default is
%% 8MB.
{js_max_vm_mem, 8},
%% js_thread_stack is the maximum amount of thread stack, in megabyes,
%% allocate to the Javascript VMs. If unset, the default is 16MB.
%% NOTE: This is not the same as the C thread stack.
{js_thread_stack, 16},
%% Number of objects held in the MapReduce cache. These will be
%% ejected when the cache runs out of room or the bucket/key
%% pair for that entry changes
{map_cache_size, 10000},
%% js_source_dir should point to a directory containing Javascript
%% source files which will be loaded by Riak when it initializes
%% Javascript VMs.
%{js_source_dir, "/tmp/js_source"},
%% riak_stat enables the use of the "riak-admin status" command to
%% retrieve information the Riak node for performance and debugging needs
{riak_kv_stat, true}
]},
%% Bitcask Config
{bitcask, [
{data_root, "/var/lib/riak/bitcask"}
]},
%% Luwak Config
{luwak, [
{enabled, false}
]},
%% Riak_err Config
{riak_err, [
%% Info/error/warning reports larger than this will be considered
%% too big to be formatted safely with the user-supplied format
%% string.
{term_max_size, 65536},
%% Limit the total size of formatted info/error/warning reports.
{fmt_max_bytes, 65536}
]},
%% SASL config
{sasl, [
{sasl_error_logger, {file, "/var/log/riak/sasl-error.log"}},
{errlog_type, error},
{error_logger_mf_dir, "/var/log/riak/sasl"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
]}
]
$ riak-admin status
Attempting to restart script through sudo -u riak
1-minute stats for 'riak@falcon05-riak'
-------------------------------------------
vnode gets : 0
vnode_puts : 0
read_repairs : 0
vnode_gets_total : 1926024
vnode_puts_total : 1813550
node_gets : 0
node_gets_total : 1084264
node_get_fsm_time_mean : undefined
node_get_fsm_time_median : undefined
node_get_fsm_time_95 : undefined
node_get_fsm_time_99 : undefined
node_get_fsm_time_100 : undefined
node_puts : 0
node_puts_total : 1039231
node_put_fsm_time_mean : undefined
node_put_fsm_time_median : undefined
node_put_fsm_time_95 : undefined
node_put_fsm_time_99 : undefined
node_put_fsm_time_100 : undefined
read_repairs_total : 11994
cpu_nprocs : 671
cpu_avg1 : 438
cpu_avg5 : 479
cpu_avg15 : 479
mem_total : 33806426112
mem_allocated : 20509155328
disk : [{"/",273952104,8},
{"/dev",16502620,1},
{"/dev/shm",16507044,0},
{"/var/run",16507044,1},
{"/var/lock",16507044,0},
{"/lib/init/rw",16507044,0},
{"/var/lib/ureadahead/debugfs",273952104,8},
{"/boot",482922,7}]
nodename : 'riak@falcon05-riak'
connected_nodes : ['riak@falcon06-riak']
sys_driver_version : <<"1.5">>
sys_global_heaps_size : 0
sys_heap_type : private
sys_logical_processors : 12
sys_otp_release : <<"R13B04">>
sys_process_count : 205
sys_smp_support : true
sys_system_version : <<"Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:12:12] [rq:12] [async-threads:64] [kernel-poll:true]">>
sys_system_architecture : <<"x86_64-pc-linux-gnu">>
sys_threads_enabled : true
sys_thread_pool_size : 64
sys_wordsize : 8
ring_members : ['riak@falcon05-riak',
'riak@falcon06-riak]
ring_num_partitions : 64
ring_ownership : <<"[{'riak@falcon06-riak',32},{'riak@falcon05-riak*',32}]">>
ring_creation_size : 64
storage_backend : riak_kv_bitcask_backend
pbc_connects_total : 45
pbc_connects : 0
pbc_active : 20
cluster_info_version : <<"1.0.0">>
luwak_version : <<"1.0.0">>
skerl_version : <<"1.0.0">>
riak_kv_version : <<"0.14.0">>
riak_core_version : <<"0.14.0">>
bitcask_version : <<"1.1.5">>
luke_version : <<"0.2.3">>
webmachine_version : <<"1.8.0">>
mochiweb_version : <<"1.7.1">>
erlang_js_version : <<"0.5.0">>
runtime_tools_version : <<"1.8.3">>
crypto_version : <<"1.6.4">>
os_mon_version : <<"2.2.5">>
riak_err_version : <<"1.0.0">>
sasl_version : <<"2.1.9">>
stdlib_version : <<"1.16.5">>
kernel_version : <<"2.13.5">>
executing_mappers : 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment