cockpit-session-recording icon indicating copy to clipboard operation
cockpit-session-recording copied to clipboard

Storage / resource usage of cockpit-session-recording

Open fischer-felix opened this issue 3 years ago • 5 comments

Hi, I'd like to know, how much storage and system resources a session recording approximately uses, as I am trying to decide if I should have recordings for everything or exclude certain sessions.

fischer-felix avatar Apr 07 '22 14:04 fischer-felix

Hi,

There is no way to calculate the resource usage as there are too many other factors involved, but I suspect disk space is the most limiting factor.

I would recommend enabling recording only for a group of users and monitoring the system before enabling recording for everyone.

justin-stephenson avatar Apr 07 '22 14:04 justin-stephenson

You can also enable I/O rate limiting to somewhat control how fast the space is consumed.

spbnick avatar Apr 07 '22 14:04 spbnick

Is there any way I could check how much disk space is used, so I could see for myself what config I'd go with?

fischer-felix avatar Apr 07 '22 16:04 fischer-felix

Unless you set the rate limit, ultimately it could be anything at all, only limited by your CPU speed and memory/storage bandwidth.

IIRC, the rate limit is specified in encoded (JSON) bytes, so the "rate" setting would give you an upper limit (default is 16KB/s). You can also set the burst limit to e.g. allow a quick display of a long program output.

If you want to know the average encoding overhead, start something like tlog-rec -o test.log dd if=/dev/urandom bs=1024 count=1024 > /dev/null. This would encode 1MB of random data into the test.log file.

Also, try taking @justin-stephenson's advice and just record a few sessions to get a feel of what sizes you get.

spbnick avatar Apr 07 '22 17:04 spbnick

Actually, encoding random binary data wouldn't be representative of a typical shell session in overhead, but rather closer to the worst case, so please disregard that. Take a big text file, or a log, and print it under tlog to see something close to reality.

spbnick avatar Apr 07 '22 17:04 spbnick