Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.
This repository was archived by the owner on May 24, 2022. It is now read-only.

Light client syncs slowly when fether is launched #228

@Tbaut

Description

@Tbaut

Launching a fresh (as in, not synced before) light client alone, without Fether, it syncs pretty quickly, at around ~x000hdrs/s.

When launching Fether (as it gets connected to the light client), the sync of the light client gets much much slower, around x00hdr/s or less.

Seen on windows (as I was testing Fether) and Linux.

Example:
I launch the node alone, it syncs

parity --chain kovan --no-ancient-blocks --light        
2018-11-05 14:37:51  Starting Parity-Ethereum/v2.1.3-beta-18ddd7c-20181015/x86_64-linux-gnu/rustc1.29.0
2018-11-05 14:37:51  Keys path /home/thib/.local/share/io.parity.ethereum/keys/kovan
2018-11-05 14:37:51  DB path /home/thib/.local/share/io.parity.ethereum/chains_light/kovan/db/9bf388941c25ea98
2018-11-05 14:37:51  Running in experimental Light Client mode.
2018-11-05 14:37:52  Inserting hardcoded block #9023489 in chain
2018-11-05 14:37:52  Debug API is not available in light client mode.
2018-11-05 14:37:52  Debug API is not available in light client mode.
2018-11-05 14:37:55  Imported #9024514 0xcb30…559a (2.48 Mgas)
2018-11-05 14:37:57  Syncing #9029377 0xbe47…c4f1  1177.6 hdr/s      0+    0 Qed  14/50 peers   4 MiB cache 0 bytes queue  RPC:  0 conn,    0 req/s,    0 µs
2018-11-05 14:37:57  Public node URL: enode://8c820b97320e978b841fe62fed9a6ac2baca0ff59abe40460d2fba7e062ebe3ec4ad48c815a9656d9b26ba3f593640bb4ac4347fcbf0362637770d724b96d7c2@192.168.1.159:30303
2018-11-05 14:38:02  Syncing #9029377 0xbe47…c4f1     0.0 hdr/s      0+    0 Qed  16/50 peers   4 MiB cache 0 bytes queue  RPC:  0 conn,    0 req/s,    0 µs
2018-11-05 14:38:07  Imported #9029378 0xe4d7…cd4e (0.29 Mgas)
2018-11-05 14:38:12  Syncing #9052026 0x07ce…dd2b  2264.9 hdr/s      0+10879 Qed  14/50 peers   10 MiB cache 8 MiB queue  RPC:  0 conn,    0 req/s,    0 µs
2018-11-05 14:38:17  Syncing #9074946 0x2b73…912d  4584.0 hdr/s      0+ 7551 Qed  16/50 peers   10 MiB cache 6 MiB queue  RPC:  0 conn,    0 req/s,    0 µs
2018-11-05 14:38:17  Imported #9075202 0x2cd2…ca90 (0.08 Mgas) + another 255 header(s)
2018-11-05 14:38:18  Imported #9080834 0x5360…24cf (0.10 Mgas) + another 255 header(s)
2018-11-05 14:38:21  Imported #9088770 0x4e55…bfca (0.04 Mgas) + another 255 header(s)
2018-11-05 14:38:22  Imported #9092866 0x3a7d…555c (0.26 Mgas) + another 255 header(s)
2018-11-05 14:38:22  Syncing #9093418 0x61dc…fc79  3694.4 hdr/s      0+  768 Qed  16/50 peers   10 MiB cache 600 KiB queue  RPC:  0 conn,    0 req/s,    0 µs
2018-11-05 14:38:24  Imported #9095939 0xd2f0…cc7f (0.37 Mgas)
2018-11-05 14:38:25  Imported #9098499 0x707a…de75 (0.34 Mgas)
2018-11-05 14:38:28  Imported #9110484 0x52da…311a (0.70 Mgas) + another 255 header(s)
2018-11-05 14:38:31  Imported #9121492 0x2338…d0d7 (0.11 Mgas) + another 255 header(s)
2018-11-05 14:38:32  Syncing #9127476 0x911d…7f89  3406.1 hdr/s      0+26415 Qed  18/50 peers   10 MiB cache 20 MiB queue  RPC:  1 conn,    2 req/s,   42 µs
2018-11-05 14:38:33  Imported #9130452 0xb3b8…bdb9 (1.41 Mgas) + another 255 header(s)
2018-11-05 14:38:34  Imported #9133524 0x58e2…86e9 (0.02 Mgas) + another 255 header(s)
2018-11-05 14:38:35  Imported #9137876 0x192e…dea3 (0.02 Mgas) + another 255 header(s)
2018-11-05 14:38:37  Syncing #9145230 0xb73e…383a  3550.8 hdr/s      0+15663 Qed  13/50 peers   10 MiB cache 12 MiB queue  RPC:  1 conn,    2 req/s,   42 µs
2018-11-05 14:38:37  Imported #9145812 0x1e18…e69b (0.24 Mgas) + another 255 header(s)
2018-11-05 14:38:39  Imported #9153748 0x868f…3a38 (0.05 Mgas) + another 255 header(s)
2018-11-05 14:38:42  Imported #9166548 0xa74b…1355 (1.50 Mgas) + another 255 header(s)
2018-11-05 14:38:42  Syncing #9166579 0xd4e2…b44c  4269.8 hdr/s      0+29907 Qed  18/50 peers   10 MiB cache 23 MiB queue  RPC:  1 conn,    2 req/s,   42 µs

Then I launch Fether, and the sync rate starts dropping

2018-11-05 14:38:52  Syncing #9204739 0x8697…479a  3817.1 hdr/s      0+    0 Qed  19/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   41 µs
2018-11-05 14:38:52  Imported #9204740 0xbee2…969b (0.04 Mgas)
2018-11-05 14:38:57  Syncing #9206275 0x5227…3e66   307.2 hdr/s      0+    0 Qed  15/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    2 req/s,   46 µs
2018-11-05 14:39:02  Syncing #9207043 0x6d7c…2fbd   153.6 hdr/s      0+    0 Qed  12/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   46 µs
2018-11-05 14:39:02  Imported #9207044 0x3824…411f (0.00 Mgas)
2018-11-05 14:39:07  Syncing #9208835 0xba2a…1a06   358.4 hdr/s      0+    0 Qed  13/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   46 µs
2018-11-05 14:39:09  Imported #9208836 0xb1f7…6f20 (0.04 Mgas)
2018-11-05 14:39:12  Syncing #9210627 0x96c5…eecb   358.4 hdr/s      0+    0 Qed  15/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   48 µs
2018-11-05 14:39:17  Syncing #9211395 0x4457…4ce1   153.6 hdr/s      0+    0 Qed  15/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   50 µs
2018-11-05 14:39:20  Imported #9212676 0x6599…36b2 (0.00 Mgas)
2018-11-05 14:39:22  Syncing #9213443 0xace7…2a6d   409.6 hdr/s      0+    0 Qed  12/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   66 µs
2018-11-05 14:39:24  Imported #9213444 0xc150…6b95 (0.00 Mgas)
2018-11-05 14:39:27  Syncing #9214723 0xc53c…ba70   256.0 hdr/s      0+    0 Qed  12/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    2 req/s,   74 µs
2018-11-05 14:39:28  Imported #9214724 0x9a47…18c8 (0.00 Mgas)
2018-11-05 14:39:32  Syncing #9215747 0x564a…0aa2   204.8 hdr/s      0+    0 Qed  16/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,   86 µs
2018-11-05 14:39:32  Imported #9215748 0xa452…544c (0.00 Mgas)
2018-11-05 14:39:37  Syncing #9216771 0x8211…0788   204.8 hdr/s      0+    0 Qed  14/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    0 req/s,   86 µs
2018-11-05 14:39:37  Imported #9216772 0xe78f…33d0 (1.92 Mgas)
2018-11-05 14:39:43  Imported #9218564 0x9d52…d0cf (0.26 Mgas)
2018-11-05 14:39:47  Syncing #9219588 0xb082…caa5   281.7 hdr/s      0+    0 Qed  13/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,  117 µs
2018-11-05 14:39:52  Syncing #9220612 0x7d52…1011   204.8 hdr/s      0+    0 Qed  13/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,  114 µs
2018-11-05 14:39:53  Imported #9221126 0xb837…f88f (0.45 Mgas) + another 1 header(s)
2018-11-05 14:39:57  Syncing #9222148 0x5db9…ce4a   307.2 hdr/s      0+    0 Qed  12/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,  114 µs
2018-11-05 14:40:02  Syncing #9223940 0x2ac5…b12d   358.4 hdr/s      0+    0 Qed  14/50 peers   10 MiB cache 0 bytes queue  RPC:  1 conn,    1 req/s,  114 µs

If the node is not launched before Fether (and Fether launch it itself) the sync will be very slow from the start. This seems to be due to the RPC Fether is doing everytime there is a new block

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions