![]() |
TweaksOn this page you can find ways to improve performance and lower resource consumptions of a running client.Disable countersEdit the config file and set the value ofStats.NoCounters to true.This will turn off node's internal statistics which should improve performance. Note: It is likely that such a performance gain will not be noticable. Initial chain sync cacheIf you have a fast (e.g. 1Gbit) network connection and some RAM to spare, examine the two options below.Don't bother with a slow connection, as the network speed is your bottleneck then. The first option will likely have a better effect on the performance.
1. This only affects the chain sync performance. Once the chain is synchronized, it does not matter. 2. Monitor your system for RAM usage, during the sync. If it uses all the RAM, better to revert your config changes. 3. The node does not need restarting to apply new values of these parameters. Disable wallet functionalityYou can disable node's wallet functionality, to save system memory used by a running client and improve block processing times.In order to do so, use TextUI command wallet off or click the disable wallet button on the bottom of the Wallet page in the WebUI.If you don't want the wallet functionality to automatically enable after the node is started, set the value of AllBalances.AutoLoad to false in the
config file.Note: You can manually enable wallet functionality at any time while the node is running, either from WebUI or by executing TextUI command wallet on .External secp256k1 speedupsIt is possible to use libsecp256k1 (maintained by Bitcoin Core project) that is written in C and assembler.Note: Thanks to the recent improvements, an external library does not always perform better than the Gocoin's native one. To check if it does, use test programs from gocoin/lib/others/cgo/ec_bench/ - for instance: go run gonative.go vs go run sipasec.go .To make Gocoin client to use the external library, copy either the file sipadll.go (Windows only) or sipasec.go (any OS),
from gocoin/client/speedups/ to its parent folder (gocoin/client/ ).
Then rebuild and restart the client.Note: You can have either sipadll.go or sipasec.go in your
gocoin/client/ folder, but never both of them as the client will not build then.Depending which speedup file you chose, follow either of the instructions in the table below.
Compress UTXO recordsTo save some system memory as well as a disk space, although at the cost of a performance, you can compress UTXO database.In order to do this, execute the tool utxo -compress .The tool needs to be executed from inside the data folder - where the UTXO.db file is.The node must not be running while executing the tool. You can reverse the operation of compressing the database, be running utxo -decompress .Note: It saves only about 3% of space used by UTXO.db file. Garbage Collector and UTXO heapIf you have RAM to spare, try increasing the Garbage Collector treshold.This will increase memory usage, but should improve performance (e.g. initial blockchain download time). For that, edit the config file to set Memory.GCPercTrshold to 100 or more (higher value for more effect).You can also try switching UTXO records to Go's heap manager by setting Memory.UseGoHeap to true.
However this may as well have a negative effect on the performance.Notes: 1. Do not do this if you have less than 64GB of RAM, as it will likely slow your system down. 2. Monitor your system for RAM usage. If it uses all the RAM, means you set GCPercTrshold too high.3. The node needs to be restarted to apply a new value of Memory.UseGoHeap , but not when changing Memory.GCPercTrshold .
|