Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Languages
  • It is recommended to add swap to ensure (1) stable running of the zend daemon (and Side Chain Applications for Super Nodes) (2) challenge times that meet the criteria (Secure Node: 300 seconds, Super Node:150 seconds)
  • It is generally good practice to allocate as much swap as your configuration has physical RAM


DescriptionCommand
1

Check your current memory and swap space configuration and availability

NOTE: Under the "total" column, you will see the total system memory allocation needed to configure the swap for step 2

free -h

Get a list of swapfile names and paths for your system

sudo swapon -s

Turn off and remove the swap file if one already exists (change /swapfile as necessary to the path and name of your swapfile)

sudo swapoff /swapfile
sudo rm /swapfile
2

Allocate the swapfile, changing the command as necessary

NOTE: A Secure Node with 2GB RAM, will need to add a 2GB swap file

NOTE: A Super Node with 8GB RAM, may add a 8GB swap file (change 2G on the right to 8G)

Don't enter this entry without first changing the value as instructed in the description column

sudo fallocate -l 2G /swapfile
3Set permissions on the swapfile
sudo chmod 600 /swapfile
4Format the file as swap space
sudo mkswap /swapfile
5Activate swap
sudo swapon /swapfile
6

Validate swap is activated using this command, the output should return a row for 'Swap:' as shown in the example output; with the value in the 'total column matching the allocated amount of swap from step 1

free -h

This is an example of a system with 2GB of RAM, 2GB of swap was set in step 2

Example Output

zenops@node01:~$ free -h
............................total............used.................free.......shared....buff.cache.......available
Mem:.................1.9G............1.3G.................66M...........12M.............576M.............489M
Swap:.................2.0G...........0.0M.................2.0G

7

Edit the /etc/sysctl.conf file to specify the 'swappiness' behaviour of your node

Edit the /etc/fstab file, specifying that swap should be mounted at boot

echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
8Activate the updated configuration (without rebooting)
sudo sysctl -p
9

Test that your node is capable of running challenges in the required time, the "runningtime" value returned (example output) is required to be fewer than 200 seconds (Secure Node) or 100 seconds (Super Node)

Check your node's block height, compare with: https://explorer.zensystem.io/

NOTE: If your node is still downloading the blockchain, it is very likely that this benchmark will fail, with much higher times than expected

NOTE: You can skip this step for the sake of being efficient and continue on with parts 4 to 6 and return here to benchmark

While the blockchain is downloading and indexing, it will use extra CPU cycles (see notes). Check the current block height

zen-cli getblockcount

It is normal to not get an output right away, it may take a few minutes

zen-cli zcbenchmark createjoinsplit 1


Example Output

zenops@node01:~$ zen-cli zcbenchmark createjoinsplit 1
[
{
"runningtime": 80.682516
}
]

Part 3a of 11 - Adding swap and Benchmark

Error rendering macro 'excerpt-include' : No link could be created for 'Social Links'.

  • No labels