[RADIATOR] memory leaks

Jan Tomasek jan at tomasek.cz
Fri Nov 29 09:57:34 UTC 2019


Hi,

after I started using FarmSize = 3 I've noted that Radiator is quite
badly leaking memory, see:
    http://tomasek.cz/stuff/memusage_radiusd-day.png

I'm not sure that the problem comes with FarmSize. The system has 32GB
RAM and with 3 workers it becomes visible. I wasn't monitoring memory
consumption before.

The automatic restart is scheduled at 6:59. That is the lowest value in
the graph (3.18GB), later every 2nd hour in 25minute memory consumption
jumps by ~1.5GB, detail:
    http://tomasek.cz/stuff/memusage_radiusd-day.png

I do not think it is related to user activity as the graph seems to jump
by constant step every 2h. CPU load graphs:
    http://tomasek.cz/stuff/cpuload_radiusd.png
top user activity is at 12.

I'm running Radiator as Czech eduroam proxy. I've about 450 peer RADIUS
servers, mostly (400+) using RadSec. I'm using CRL checking, which is
the main reason for its initial memory footprint but can hardly explain
memory leaks.

I'm logging with trace 4 and rotating logs every one hour:

<Log FILE>
  Filename        /mnt/ramdisk/radiator.%Y_%m_%d_%H.log
  Trace           4

  LogFarmInstance
  LogTraceId
  LogMicroseconds
</Log>

That is only periodical activity configured - but it happens every hour.

I'm running version 4.23.43 on Debian Stretch.

Data about memory footprint are collected this way:
	pidstat -h -r -v -C radiusd | grep '^ ' | awk 'BEGIN { sum = 0 } { sum
+= $6 } END { print 1024*sum }'
So Virtual Size is collected.

Total memory usage of the system:
	http://tomasek.cz/stuff/total-memory.png
does not show growth so clearly as only isolated Radiator. There is some
periodicity at 40minute of every hour?

I will start monitoring also Resident Set Size, I guess it will not show
steps like Virtual, but fact that radiator is leaking memory remains.

root at radius1mng4:~# pidstat -h -r -v -C radiusd
Linux 4.9.0-11-amd64 (radius1mng4) 	11/29/2019 	_x86_64_	(8 CPU)

> #      Time   UID       PID  minflt/s  majflt/s     VSZ     RSS   %MEM threads   fd-nr  Command
>  1575021131     0     19525      0.00      0.00  120976   53864   0.16       1      12  radiusd
>  1575021131     0     19526      0.22      0.00 1850912 1743868   5.31       1     447  radiusd
>  1575021131     0     19527      0.24      0.00 2025976 1916412   5.83       1     450  radiusd
>  1575021131     0     19528      0.24      0.00 2038272 1928520   5.87       1     451  radiusd

Best regards
-- 
-----------------------
Jan Tomasek aka Semik
http://www.tomasek.cz/


More information about the radiator mailing list