Skip to content

Slow execution (spurious idle-periods during startup) #1464

Closed
@holiman

Description

This might not be an error at all, I'm just trying to figure out why evmtool is extremely slow on my machine, and I noticed the same/similar happening with besu too.

I compiled latest besu (at 2d7cdf0da4cf7dd2a5f7db5de750ef6358b0f73a), and ran it, like so, on a little 4-core NUC unit.

~/besu$ ./build/install/besu/bin/besu --logging=ALL
Setting logging level to ALL
2020-10-16 14:23:38.046+02:00 | main | INFO  | AltBN128PairingPrecompiledContract | Using native alt bn128
2020-10-16 14:27:03.520+02:00 | main | INFO  | SECP256K1 | Using native secp256k1

There is a four-minute gap between those lines, where seemingly nothing happens. There is almost no IO, there is almost zero processor use, and I have no idea what's going on. After that, things start happening at a rapid pace:

2020-10-16 14:23:38.046+02:00 | main | INFO  | AltBN128PairingPrecompiledContract | Using native alt bn128
2020-10-16 14:27:03.520+02:00 | main | INFO  | SECP256K1 | Using native secp256k1
2020-10-16 14:27:03.529+02:00 | main | INFO  | Besu | Starting Besu version: besu/v20.10.1-dev-2d7cdf0d/linux-x86_64/openjdk-java-14
2020-10-16 14:27:03.560+02:00 | main | DEBUG | ResourceLeakDetector | -Dio.netty.leakDetection.level: simple
2020-10-16 14:27:03.560+02:00 | main | DEBUG | ResourceLeakDetector | -Dio.netty.leakDetection.targetRecords: 4
2020-10-16 14:27:03.567+02:00 | main | DEBUG | InternalThreadLocalMap | -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
2020-10-16 14:27:03.567+02:00 | main | DEBUG | InternalThreadLocalMap | -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
2020-10-16 14:27:03.572+02:00 | main | DEBUG | MultithreadEventLoopGroup | -Dio.netty.eventLoopThreads: 8
2020-10-16 14:27:03.586+02:00 | main | DEBUG | NioEventLoop | -Dio.netty.noKeySetOptimization: false
2020-10-16 14:27:03.586+02:00 | main | DEBUG | NioEventLoop | -Dio.netty.selectorAutoRebuildThreshold: 512
2020-10-16 14:27:03.594+02:00 | main | DEBUG | PlatformDependent0 | -Dio.netty.noUnsafe: false
2020-10-16 14:27:03.595+02:00 | main | DEBUG | PlatformDependent0 | Java version: 14
2020-10-16 14:27:03.596+02:00 | main | DEBUG | PlatformDependent0 | sun.misc.Unsafe.theUnsafe: available
2020-10-16 14:27:03.596+02:00 | main | DEBUG | PlatformDependent0 | sun.misc.Unsafe.copyMemory: available
2020-10-16 14:27:03.597+02:00 | main | DEBUG | PlatformDependent0 | java.nio.Buffer.address: available
2020-10-16 14:27:03.597+02:00 | main | DEBUG | PlatformDependent0 | direct buffer constructor: available
2020-10-16 14:27:03.598+02:00 | main | DEBUG | PlatformDependent0 | java.nio.Bits.unaligned: available, true
2020-10-16 14:27:03.599+02:00 | main | DEBUG | PlatformDependent0 | jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available
2020-10-16 14:27:03.599+02:00 | main | DEBUG | PlatformDependent0 | java.nio.DirectByteBuffer.<init>(long, int): available
2020-10-16 14:27:03.600+02:00 | main | DEBUG | PlatformDependent | sun.misc.Unsafe: available
2020-10-16 14:27:03.600+02:00 | main | DEBUG | PlatformDependent | maxDirectMemory: 8344567808 bytes (maybe)
2020-10-16 14:27:03.600+02:00 | main | DEBUG | PlatformDependent | -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
2020-10-16 14:27:03.600+02:00 | main | DEBUG | PlatformDependent | -Dio.netty.bitMode: 64 (sun.arch.data.model)
2020-10-16 14:27:03.601+02:00 | main | DEBUG | PlatformDependent | -Dio.netty.maxDirectMemory: 8344567808 bytes
2020-10-16 14:27:03.601+02:00 | main | DEBUG | PlatformDependent | -Dio.netty.uninitializedArrayAllocationThreshold: 1024
2020-10-16 14:27:03.602+02:00 | main | DEBUG | CleanerJava9 | java.nio.ByteBuffer.cleaner(): available
2020-10-16 14:27:03.602+02:00 | main | DEBUG | PlatformDependent | -Dio.netty.noPreferDirect: false
2020-10-16 14:27:03.607+02:00 | main | DEBUG | PlatformDependent | org.jctools-core.MpscChunkedArrayQueue: available

Running it a second time, it came up very quickly:

Setting logging level to ALL
2020-10-16 14:32:47.648+02:00 | main | INFO  | AltBN128PairingPrecompiledContract | Using native alt bn128
2020-10-16 14:32:48.228+02:00 | main | INFO  | SECP256K1 | Using native secp256k1
2020-10-16 14:32:48.233+02:00 | main | INFO  | Besu | Starting Besu version: besu/v20.10.1-dev-2d7cdf0d/linux-x86_64/openjdk-java-14

Running it a third time, it stalled for about 2 minutes again:

2020-10-16 14:32:55.522+02:00 | main | INFO  | AltBN128PairingPrecompiledContract | Using native alt bn128
2020-10-16 14:35:09.658+02:00 | main | INFO  | SECP256K1 | Using native secp256k1
2020-10-16 14:35:09.665+02:00 | main | INFO  | Besu | Starting Besu version: besu/v20.10.1-dev-2d7cdf0d/linux-x86_64/openjdk-java-14
2020-10-16 14:35:09.705+02:00 | main | DEBUG | ResourceLeakDetector | -Dio.netty.leakDetection.level: simple

Any idea what's going on here?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions