17

geth help has:

VIRTUAL MACHINE OPTIONS:

--jitvm Enable the JIT VM

The impact of --jitvm has been unanswered and I'm looking for answers to these 3 specifically:

How much faster is geth --fast --jitvm than just geth --fast?

How much faster is geth --fast --cache=1024 --jitvm than just geth --fast --cache=1024?

How much faster is geth --jitvm than just geth?

eth
  • 85,679
  • 53
  • 285
  • 406
  • 1
    a typical benchmarking would mean : a) remove any prior db with geth removedb b) close all software that uses bandwith (torrent addicts :) c) run the command d) how you time it ? d) is critical, I can't think of a way to get the timestamp whn the db is synced – euri10 May 23 '16 at 09:48

2 Answers2

18

geth 1.5 is way faster but there are problems to keep connections with peers. When there is a high latency, it removes agressively the peer connection. I use the patch 2630 from Péter Szilágyi in the 1.5 version.

geth 1.4.4

benchmarks done on OS X with 37320qm 16Go ram 1To SSD with geth 1.4.4 (stable):

___________________________________________________________________
| Option                      | Disk Used | Time | Disk Written   |
|-----------------------------|-----------|-------|---------------|
|                             | 21GB      | 5h00  | 1TB           |
| --fast                      | 4.1GB     | 1h00  | 100GB         |
| --cache 1024 --jitvm        | 21GB      | 6h00  | 1TB           |
| --fast --cache 1024 --jitvm | ????      |       |               |
-------------------------------------------------------------------

Note: network is very unstable today (for the --cache and --jitvm benchs), other tests were done when network worked better. There are many times where geth loose all peers. But not sure there are great benefices with --jitvm or --cache.

geth 1.4.6 on SSD

benchmarks done on OS X with 37320qm 16Go ram 1To SSD:

___________________________________________________________________
| Option                      | Disk Used | Time | Disk Written   |
|-----------------------------|-----------|-------|---------------|
|                             | 21GB      |       |               |
| --cache 1024 --jitvm        | 21GB      | 4h10  | 543GB         |
| --fast                      | 4.1GB     | 25m   | 52GB          |
| --fast --cache 1024 --jitvm | 4.1GB     |       |               |
-------------------------------------------------------------------

The results should be the same as the 1.5.0 version. The difference is probably due to network connections with other peers.

geth 1.4.6 on HDD

benchmarks done on OS X with 37320qm 16Go ram 1To HDD 5400tr/min:

___________________________________________________________________
| Option                      | Disk Used | Time  | Disk Written  |
|-----------------------------|-----------|-------|---------------|
|                             |           |       |               |
| --cache 1024 --jitvm        |           | 20h   | 450GB         |
| --fast                      | 4.1GB     |       | 60GB          |
| --fast --cache 1024 --jitvm | 4.1GB     | 4h15m | 60GB          |
------------------------------------------------------------------

The HDD benchmarks is very low. It is way slower. If you have 8Go of ram, create a RAM disk to do the --fast & --datadir on it and copy the results in your ethereum directory.

geth 1.5.0 with patch 2657 (Collections of future patchs)

benchmarks done on OS X with 37320qm 16Go ram 1To SSD with geth 1.5.0 (unstable) the 4 june 2016:

__________________________________________________________________
| Option                      | Disk Used | Time | Disk Written  |
|-----------------------------|-----------|------|---------------|
|                             | 21GB      |      | 450GB         |
| --cache 1024 --jitvm        | 21GB      |3h01  | 450GB         |
| --fast                      | 4.1GB     |20m06 | 52GB          |
| --fast --cache 1024 --jitvm | 4.1GB     |21m10s| 52GB          |
------------------------------------------------------------------

This version 1.5 is very stable. I made few full syncs and fast synchs and found the same results +/- few %. Good Work

Note 1: for the --fast flag, the --jitvm and the --cache show no gain.

Note 2: the import operation is similar to a full synchronization: 3h00

Ellis
  • 2,354
  • 14
  • 14
  • how did you time the various options ? – euri10 Jun 01 '16 at 09:07
  • i run the geth commands until i have the all blocks currently 1.6Mi blocks – Ellis Jun 01 '16 at 09:23
  • so --fast seems to improve things a lot while the gain from --cache 1024 --jitvm is very limited. can't wait to put the 50 bounty, amazing work – euri10 Jun 07 '16 at 15:03
  • The jitvm is for the future when smart contracts will be large. The cache does not improve because of the SSD, i will try a bench with an HDD – Ellis Jun 07 '16 at 15:25
2

I did a few bench by myself and found as well that there is no significant impact of --jitvm. And I agree that geth 1.5.0 with patch is way faster.:)

Note: the 1.4.6 version has these patchs and synchronize quickly

Ellis
  • 2,354
  • 14
  • 14
yoregis
  • 1,242
  • 11
  • 13
  • 2
    It will only make significant/noticeable difference on large programs. There are some optimisations pending that will make a huge difference. See https://medium.com/@jeff.ethereum/optimising-the-ethereum-virtual-machine-58457e61ca15 – Jeffrey W. Jun 04 '16 at 21:53
  • I just tried the 1.4.6 on a 70k private chain and its 20 secs slower in comparison to a 1.4.4 node. --jitvm seems 30sec faster than without it. Everything differs when nodes are running concurrently though. – mechanicum Sep 20 '16 at 08:33