Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page Tree
expandCollapseAlltrue
rootSuper Nodes


Panel
borderColorgrey
bgColorwhite
titleColorblack
borderWidth1
titleBGColorwhite
borderStylesolid
titleLanguages


  • 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: 200 seconds, Super Node:100 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


Code Block
free -h

Get a list of swapfile names and paths for your system

Code Block
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)

Code Block
sudo swapoff /swapfile
sudo rm /swapfile


2

Allocate the swapfile, changing the command as necessaryNOTE: 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

Code Block
sudo fallocate -l 2G /swapfile


3Set permissions on the swapfile


Code Block
sudo chmod 600 /swapfile


4Format the file as swap space


Code Block
sudo mkswap /swapfile


5Activate swap


Code Block
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


Code Block
free -h


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

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample 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


Code Block
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)


Code Block
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

Code Block
zen-cli getblockcount

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

Code Block
zen-cli zcbenchmark createjoinsplit 1
Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample Output
zenops@node01:~$ zen-cli zcbenchmark createjoinsplit 1
[
{
"runningtime": 80.682516
}
]



Part 3a of 11 - Adding swap and Benchmark

Insert excerpt
Social Links
Social Links
nopaneltrue