Skip to content

Performance issue 100% CPU with Node 12.8.0 (OpenSSL 1.1.1c) on MacOS #821

@alexey-temnikov

Description

@alexey-temnikov

Due to the change in OpenSSL Implementation
openssl/openssl@2500c09

The usage of crypto algorithms causing 100% CPU usage in certain scenarios (like building ssh tunnels).

It seems it impacts in MacOS when ssh tunnel is build (reproduce using tunnel-ssh module).

 [Summary]:
   ticks  total  nonlib   name
     16    0.0%    0.0%  JavaScript
  95718   99.9%  100.0%  C++
    143    0.1%    0.1%  GC
     63    0.1%          Shared libraries
      4    0.0%          Unaccounted
   ticks parent  name
  92138   96.2%  T node::crypto::DiffieHellman::New(v8::FunctionCallbackInfo<v8::Value> const&)
  92138  100.0%    t __ZN2v88internal12_GLOBAL__N_125SimpleInstallGetterSetterEPNS0_7IsolateENS0_6HandleINS0_8JSObjectEEENS4_INS0_6StringEEENS0_8Builtins4NameESA_
  92138  100.0%      LazyCompile: ~DiffieHellman internal/crypto/diffiehellman.js:32:23
  92138  100.0%        LazyCompile: ~createDiffieHellman crypto.js:126:29
  92138  100.0%          LazyCompile: ~onKEXDH_GEX_GROUP .../node_modules/ssh2-streams/lib/ssh.js:2567:27
  92138  100.0%            LazyCompile: ~<anonymous> .../node_modules/ssh2-streams/lib/ssh.js:217:21

Also reproduced using latest version "ssh2": "^0.8.5".
#816 nodejs/node#28404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions