agent icon indicating copy to clipboard operation
agent copied to clipboard

sshlog process using 80% to 90% CPU

Open ulkish opened this issue 2 years ago • 9 comments

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.

ulkish avatar May 18 '23 21:05 ulkish

Thanks for the report. That is strange. I will try and figure out a way to reproduce.

matthill avatar May 21 '23 11:05 matthill

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.

jhaendel avatar Oct 18 '23 07:10 jhaendel

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?

travelhawk avatar Mar 20 '24 09:03 travelhawk

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.

mbabuskov avatar Jun 18 '24 10:06 mbabuskov

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.

MSagwadiya avatar Jul 14 '24 16:07 MSagwadiya

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

mastershadow avatar Oct 22 '24 08:10 mastershadow

anyone have idea how can we solve this ?

MSagwadiya avatar Oct 22 '24 09:10 MSagwadiya

@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 :-(

mircsicz avatar Nov 29 '24 11:11 mircsicz