On 2023-03-14 08:49, Richard Lewis wrote:
On Mon, 13 Mar 2023, 12:36 Simon Deziel, <[email protected]> wrote:

egrep still consumes a lot of memory for me. A workaround I've been
using is to add this to /etc/logcheck/logcheck.conf:

# XXX: prevent grep from using incredible amounts of RAM (>3G RSS)
#      this also speeds up grep a lot
export LC_ALL=C



interesting - does using C.UTF-8 have the same effect?

tl; dr: no :/

According to my simple test:

# grep LC_ALL /etc/logcheck/logcheck.conf; time sudo -u logcheck logcheck -t
export LC_ALL=C

real    0m2.706s
user    0m0.005s
sys     0m0.010s


# grep LC_ALL /etc/logcheck/logcheck.conf; time sudo -u logcheck logcheck -t
export LC_ALL=C.UTF-8

real    0m9.374s
user    0m0.007s
sys     0m0.010s

The above only shows the time spent but when checking with `top`, the `%MEM` goes up to ~47% for LC_ALL=C and reaches ~95% with LC_ALL=C.UTF-8.

Simon

Reply via email to