Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

July 11, 2013

Riak 1.4 – Install Notes on Ubuntu 12.04 (precise)

Filed under: Erlang,Riak — Patrick Durusau @ 12:57 pm

While installing Riak 1.4 I encountered some issues and thought writing down the answers might help someone else.

Following the instructions for Installing From Apt-Get, when I reached:

sudo apt-get install riak

I got this message:

Failed to fetch
http://apt.basho.com/pool/precise/main/riak_1.4.0-1_amd64.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with
–fix-missing?

Not a problem with the Riak 1.4 distribution but an error with Ubuntu.

Correct as follows:

sudo aptitude clean

(rtn)

Then;

sudo aptitude update

(rtn)

close, restart Linux

Cleans the apt cache and then the install was successful.

Post Installation Notes:

Basho suggests to start Riak with:

riak start

My results:

Unable to access /var/run/riak, permission denied, run script as root

Use:

sudo riak start

I then read:

sudo riak start
!!!!
!!!! WARNING: ulimit -n is 1024; 4096 is the recommended minimum.
!!!!

The ulimit warning is not unexpected and solutions are documented at: Open Files Limit.

As soon as I finish this session, I am going to create the file /etc/default/riak and its contents will be:

ulimit -n 65536

The file needs to be created as root.

May as well follow the instructions for “Enable PAM Based Limits for Debian & Ubuntu” in the Open Files document as well. Requires a reboot.

The rest of the tests of the node went well until I got to:

riak-admin diag

The documentation notes:

Make the recommended changes from the command output to ensure optimal node operation.

I was running in an Emacs shell so capturing the output was easy:

riak-admin diag
[critical] vm.swappiness is 60, should be no more than 0
[critical] net.core.wmem_default is 229376, should be at least 8388608
[critical] net.core.rmem_default is 229376, should be at least 8388608
[critical] net.core.wmem_max is 131071, should be at least 8388608
[critical] net.core.rmem_max is 131071, should be at least 8388608
[critical] net.core.netdev_max_backlog is 1000, should be at least 10000
[critical] net.core.somaxconn is 128, should be at least 4000
[critical] net.ipv4.tcp_max_syn_backlog is 2048, should be at least 40000
[critical] net.ipv4.tcp_fin_timeout is 60, should be no more than 15
[critical] net.ipv4.tcp_tw_reuse is 0, should be 1
[warning] The following preflists do not satisfy the n_val:
[[{0,
‘riak@127.0.0.1’},
{22835963083295358096932575511191922182123945984,
‘riak@127.0.0.1’},
{45671926166590716193865151022383844364247891968,
‘riak@127.0.0.1’}],
[approx. 376 lines omitted]
[{1438665674247607560106752257205091097473808596992,
‘riak@127.0.0.1’},
{0,
‘riak@127.0.0.1’},
{22835963083295358096932575511191922182123945984,
‘riak@127.0.0.1’}]]
[notice] Data directory /var/lib/riak/bitcask is not mounted with ‘noatime’. Please remount its disk with the ‘noatime’ flag to improve performance.

The first block of messages:

[critical] vm.swappiness is 60, should be no more than 0
[critical] net.core.wmem_default is 229376, should be at least 8388608
[critical] net.core.rmem_default is 229376, should be at least 8388608
[critical] net.core.wmem_max is 131071, should be at least 8388608
[critical] net.core.rmem_max is 131071, should be at least 8388608
[critical] net.core.netdev_max_backlog is 1000, should be at least 10000
[critical] net.core.somaxconn is 128, should be at least 4000
[critical] net.ipv4.tcp_max_syn_backlog is 2048, should be at least 40000
[critical] net.ipv4.tcp_fin_timeout is 60, should be no more than 15
[critical] net.ipv4.tcp_tw_reuse is 0, should be 1

are network tuning issues.

Basho answers the “how to correct?” question at Linux Performance Tuning but there is no link from the Post Installation Notes.

The next block of messages:

[warning] The following preflists do not satisfy the n_val:
[[{0,
‘riak@127.0.0.1’},
{22835963083295358096932575511191922182123945984,
‘riak@127.0.0.1’},
{45671926166590716193865151022383844364247891968,
‘riak@127.0.0.1’}],
[approx. 376 lines omitted]
[{1438665674247607560106752257205091097473808596992,
‘riak@127.0.0.1’},
{0,
‘riak@127.0.0.1’},
{22835963083295358096932575511191922182123945984,
‘riak@127.0.0.1’}]]

is a known issue: N Value – Preflist Message is Vague.

From the issue, the message means: “these preflists have more than one replica on the same node.”

Not surprising since I am running on one physical node and not in production.

The Riak Fast Track has you create four nodes on one physical node as a development environment. So I’m going to ignore the “prelists” warning in this context.

The last message:

[notice] Data directory /var/lib/riak/bitcask is not mounted with ‘noatime’. Please remount its disk with the ‘noatime’ flag to improve performance.

is resolved under “Mounts and Scheduler” in the Linux Performance Tuning document.

I am going to make all the system changes, reboot and start on the The Riak Fast Track tomorrow.

PS: In case you are wondering what this has to do with topic maps, ask yourself what characteristics you would want in a distributed topic map system?

1 Comment

  1. […] up on yesterday’s post on installing Riak 1.4 with some minor […]

    Pingback by Riak 1.4 – More Install Notes on Ubuntu 12.04 (precise) « Another Word For It — July 12, 2013 @ 1:37 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress