Re: tmpfs

Boris via leaf-user <[email protected]> Sat, 9 Nov 2024 02:33:16 +0100
Newsgroups gmane.linux.leaf.user
Message-ID <[email protected]>
Am 08.11.24 um 14:43 schrieb Erich Titl:
> Hi Boris
> 
> Am 08.11.2024 um 14:11 schrieb Boris via leaf-user:
> ...
>>>
>>> My theory is that the logs occupy a lot of memory before they are 
>>> rotated (compressed) and this memory is not released again in the tmpfs.
>  >>>> I suspect that I am doing something wrong...?
>>>
>>> Thanks and regards,,
>>>
>>>
>>> Boris
>>>
>>
>> I guess tomorrow it will happen again (tmpfs full):
>> # df -h
>> tmpfs                   500.0M    489.9M     10.1M  98% /var/log
> 
> OK almost full
> 
>>
>> But why?
>>
>> # du -h /var/log
>> 136.0K    /var/log/ntpstats
>> 16.0K    /var/log/lighttpd
>> 14.8M    /var/log
> 
> What is the content of leaf.cfg concerning the log size?
> 
> You may have defined a big chunk just for logging but how much memory 
> does your system actually have? tmpfs can only do so much.
> 
> cheers
> 
> ET
> 

Hej Erich,

thanks for yout thoughts!

My leaf.cfg settings are:
# RAM Disk partition sizes
syst_size=64M
log_size=500M
tmp_size=150M
zswap_size=0

The hardware is an APU with 4GB RAM and there is still a lot of headroom:

# cat /sys/devices/virtual/dmi/id/product_name
apu4

# cat /proc/meminfo
MemTotal:        4011840 kB
MemFree:         3353308 kB
MemAvailable:    3332712 kB

OK, I could increase log size, but every limit would be reached. With 
the current settings, log runs full in about 50 days.

Just for fun, I switched to 800 MB (and did a reboot):

# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   150.0M      4.0K    150.0M   0% /tmp
tmpfs                   800.0M    408.0K    799.6M   0% /var/log
root                     64.0M     42.9M     21.1M  67% /

# cat /proc/meminfo
MemTotal:        4011848 kB
MemFree:         3873136 kB
MemAvailable:    3851508 kB

Regards,

Boris



------------------------------------------------------------------------
leaf-user mailing list: [email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/