Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
memory leak in 22.1 ?
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: memory leak in 22.1 ? (Read 7654 times)
franco
Administrator
Hero Member
Posts: 17619
Karma: 1605
Re: memory leak in 22.1 ?
«
Reply #15 on:
April 28, 2022, 01:41:17 pm »
The log retention settings are handled by syslog-ng and currently we don't have "max size" metrics since we store logs per date, one for each day. How big your log gets depends on the days you keep and the log volume you create in a day. Capping /var/log if it's on MFS may prevent your RAM from depleting, but it won't stop filling the fixed size of /var/log if it's too small.
And, yes, logs are the main reason /var MFS existed since they can push quite a lot of data onto the disk. Other files like configuration or databases either are small or need to be persistent anyway for the system to operate correctly and remember it's data post-reboot.
Cheers,
Franco
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #16 on:
April 28, 2022, 02:15:01 pm »
to maybe find out what logfile is responsible for eating up all memory, i again switched back both, /var and /tmp to MFS and rebooted.
when accessing the machine over ssh, i see something that looks quite strange to me.
i think my machine is equipped with 8gb ram. this is also reported from OPNsense webgui.
but when i do a df (see attachment), i can see that there are 2 tmpfs partitions (which i expect to be in ram) of both about 14gb in size. i.e. i have 28gb of ramdisk within a total ram of 8gb ?!?
i think i misunderstand something...but so far can't find my misinterpretation...
Logged
Grossartig
Jr. Member
Posts: 75
Karma: 4
Re: memory leak in 22.1 ?
«
Reply #17 on:
April 29, 2022, 05:38:10 am »
My understanding of tmpfs is that each mount point merely reports the upper boundary of available space, which in each line would be the total RAM of your system. So it's not 2 x ~15GB, it's just 1 x ~15GB shared across two mount points.
So I suspect the RAM in your system isn't just 8GB, but twice that, really.
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #18 on:
April 29, 2022, 06:46:44 am »
sounds reasonable, but i don't think it's the full truth. according to the receipt, i bought
2 x 4 GB DDR3L 1600 CL11 Kingston
so it's a total of 8GB.
this is also what's reported by OPNsense (see attachment).
it really looks like OPNsense shows the remaining ramdisk space for both, the /var and the /tmp partition. but then it does quite a strange calculation. e.g. the value of available space for the /var partition is calculated as
remaining space for any partition + space already used by /var
the same is done for /tmp. that's why total space shown is different for the two partitions.
nevertheless, the total size of the ramdisk, allocated by OPNsense seems to be impossible as there is not that much memory available in the system.
Logged
Grossartig
Jr. Member
Posts: 75
Karma: 4
Re: memory leak in 22.1 ?
«
Reply #19 on:
April 29, 2022, 07:00:44 am »
Do you have two swap partitions? Can't quite figure it out in your image, but I believe the first line is RAM (8GB), then two swap partitions (8+2GB), then rootfs and your two tmpfs lines. Not entirely sure but the tmpfs size may also take swap space into account, in addition to available RAM.
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #20 on:
April 29, 2022, 07:13:40 am »
that's correct. sorry for the bad screen snapshot!
i think you're right. probably not really useful to have a ramdisk on swap, but must be the reason for the strange values shown.
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #21 on:
April 29, 2022, 07:18:47 am »
in the mean time, i found a possible reason for filling up /var/log
it was the resolver log which occupied about 600mb/day.
for some reason, the log level was set to 5 (while 1 seems to be standard config).
either this value has been modified by the update to 22.1,
or it has been set to 5 since ever in my setup, but this had no negative impact as long as i was running 21.7
so i've set this back to 1 ... and in a few weeks, i hopefully can say that this solved the issue.
thanx to all of you for the support!
Logged
franco
Administrator
Hero Member
Posts: 17619
Karma: 1605
Re: memory leak in 22.1 ?
«
Reply #22 on:
April 29, 2022, 01:12:22 pm »
Ah, ok, that explains it. The log level is optional and won't be changed by updates.
Cheers,
Franco
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #23 on:
April 29, 2022, 01:44:48 pm »
ok, so then 21.7 did not generate that much log data with level 5 configured.
thanx for clarification!
Logged
franco
Administrator
Hero Member
Posts: 17619
Karma: 1605
Re: memory leak in 22.1 ?
«
Reply #24 on:
April 29, 2022, 02:33:54 pm »
It did, but circular logging capped it to 512 kb per log type by default... On 22.1 circular logging no longer exists.
Cheers,
Franco
Logged
bongo
Jr. Member
Posts: 94
Karma: 3
Re: memory leak in 22.1 ?
«
Reply #25 on:
April 29, 2022, 03:08:08 pm »
ah, ok. so maybe i need to suppress other logging to avoid running into the same problems later on.
Logged
mooae.gg754
Newbie
Posts: 1
Karma: 0
Re: memory leak in 22.1 ?
«
Reply #26 on:
August 20, 2022, 07:39:00 pm »
I'm not an expert But I think limiting the log file size will definitely come in handy...and if the limit is reached. Old records will be deleted.
สมัครufabetขั้นต่ำ10บาท
I also think that data is written very often and not necessarily persistent, it is better to use ramdisk instead of ssd to avoid ssd being killed over time by writing too often and putting too much on it.
Logged
Print
Pages:
1
[
2
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
memory leak in 22.1 ?