sshlog process using 80% to 90% CPU
Hi there! I encountered an issue, as soon as I install sshlog the CPU usage spikes to between 80% and 90%. I copied and pasted the instructions for "Debian/Ubuntu Install (arm64 and x86_64)". Here are the details of the OS:
Operating System: Ubuntu 20.04.3 LTS Kernel: Linux 5.4.0-135-generic Architecture: x86-64
The instance is a 2 GB Memory / 1 Intel vCPU DigitalOcean droplet, tried it with 2 different servers but got the same results and had to uninstall it immediately.
Lovely program by the way, always wanted something like this.
Thanks for the report. That is strange. I will try and figure out a way to reproduce.
Hi! Got a similar issue here on Debian 11.8 using kernel 5.10.0-26-amd64. Installed from repo. Process is using about 20-40 % cpu during idle, even when there's no active ssh session established.
I tried to use sshlog on a production server. I immedialety stopped using it since it consumed ~30% CPU with just one open ssh session. Is this a bug or is it just not very performant?
Same problem on a fresh Debian 12 server install. Just looking at "top" output makes it consume 25-30% CPU. This is on a dedicated, bare metal server.
this is a great tool, but this issue critical we have stopped using it in prod. In ubuntu 24.04 also i was seeing this issue.
I've the same issue on a server with ubuntu 20 LTS The strace of the process goes like this
futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=284055168}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=299256089}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1aa79a0, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf48, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf50, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=315314138}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=330573729}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1aa79a0, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf4c, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf50, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=346678077}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=361934811}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1aa79a0, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf48, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf50, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=377939714}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1b7f9e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1729586984, tv_nsec=393138042}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out) futex(0x1aa79a0, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf4c, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x7fcc295ebf50, FUTEX_WAKE_PRIVATE, 1) = 1
anyone have idea how can we solve this ?
@matthill have you ever been looking into this?
I just encountered the same behaviour on two different Hetzner Cloud-Servers (running Ubuntu 22.04.5). Won't be able use it in production like that :-(