Tweaks

On this page you can find ways to improve performance and lower resource consumptions of a running client.

Disable counters

Edit the config file and set the value of Stats.NoCounters to true.
This will turn off node's internal statistics which should improve performance.

Turn off caching on disk

Edit the config file and set the value of Memory.CacheOnDisk to false.
This will prevent the node from caching blocks on disk, which may improve initial chain sync performance (at a cost of using more RAM).

Disable wallet functionality

You 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 speedups

It 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.

sipasec.go sipadll.go (Windows only)
In order to use sipasec.go speedup, build and install secp256k1 library in your system.

On Debian based Linux system, simply execute the following commands:
  sudo apt-get install gcc automake autoconf libtool make git libgmp-dev
  git clone https://github.com/bitcoin/bitcoin.git
  cd bitcoin/src/secp256k1/
  ./autogen.sh
  ./configure
  make
  sudo make install

Note: When the library is properly installed, executing go test inside gocoin/lib/others/cgo/sipasec/ says PASS
To use sipadll.go speedup, you have to place secp256k1.dll in gocoin/client/ or in any folder where Windows looks for executables (e.g. C:\WINDOWS).

You can find secp256k1.dll in gocoin/tools/sipa_dll/ or you can download it from sourceforge.net (it's inside secp256k1.dll_v2-amd64.zip).

To build secp256k1.dll youself, look into secp256k1_win_v2.zip.

Compress UTXO records

To 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.

Garbage Collector and UTXO heap

If you have RAM to spare, try switching UTXO records to Go's heap manager and increasing Garbage Collector's treshold.
This will increase memory usage, but should improve block processing performance (e.g. during initial blockchain download).

Edit the config file to set Memory.UseGoHeap to true and Memory.GCPercTrshold to 100 or more (higher value for more effect).
You may also try only increasing Memory.GCPercTrshold, leaving Memory.UseGoHeap set to false.

Note: The node needs to be restarted to apply a new value of Memory.UseGoHeap