Alfis icon indicating copy to clipboard operation
Alfis copied to clipboard

CPU usage (resolver mode)

Open d47081 opened this issue 1 year ago • 7 comments

After few days of using Alfis as the resolver on VPS server, found that CPU usage grows to about 50-80%

I'm also providing public DNS + opened DHT port to support the network, so maybe that's is a reason?

as blockchain cached in SQLite, not sure the issue in block values decryption for each DNS request..

d47081 avatar Dec 05 '23 13:12 d47081

I have temporarily stop the service and free about 500Mb of RAM it is regular requirements for Alfis in resolver mode?

upd. restarted the service and no problem with CPU usage now.. maybe it's really related to the public mode.

d47081 avatar Dec 05 '23 13:12 d47081

Just for a note some thoughts:

These days I've running another CPU-hungry process and maybe Alfis just stuck there with latest blocks update and I've just 'catch' this moment

My VPS have just 1 CPU core, so maybe issue in processes queue.

d47081 avatar Dec 05 '23 13:12 d47081

Can you please build a fresh binary from master branch? I've added a debugging mechanism to catch the place where it stucks.

If it stucks somewhere it will write a line in the log (syslog).

Revertron avatar Dec 05 '23 16:12 Revertron

If app version changed, I can update from repository binaries as currently have not enough of resources to compile there (Ubuntu 22.04.3 LTS)

Or maybe will try to compile on another machine with same OS and upload to server but few days later.

p.s. on my experience, it happened with other public DHT-based services, and usually depend of network activity there. but let's catch those details with syslog

d47081 avatar Dec 05 '23 17:12 d47081

I have a compiled binary at https://up.revertron.com/alfis.

You can update it like this:

service alfis stop && wget -O /usr/bin/alfis https://up.revertron.com/alfis && service alfis start

Revertron avatar Dec 05 '23 17:12 Revertron

BTW, perhaps you won't encounter this issue on a freshly built Alfis. I experienced this problem only on the version installed from the repository https://deb.revertron.com/. If I compiled Alfis myself, this binary (seemingly) didn't create such problems witj CPU load.

ufm avatar Dec 11 '23 10:12 ufm

Thanks, I'm using latest version compiled and no problems on this moment found

d47081 avatar Dec 11 '23 10:12 d47081