On Mon, Oct 8, 2018 at 2:39 PM Robert Moskowitz <rgm(a)htt-consult.com> wrote:
On 10/6/18 7:36 AM, Peter Robinson wrote:
> On Fri, Oct 5, 2018 at 10:20 PM Robert Moskowitz <rgm(a)htt-consult.com> wrote:
>>
>>
>> On 10/5/18 2:54 PM, Peter Robinson wrote:
>>
>>>> One difference I note is F28 has a swap partition, F29 does not. Now
>>>> during the initial stuff, no swap was used. Now I see 29KB of swap
used
>>>> with 86KB memory free.
>>> So we use zram for swap in F-29, it preserves the mSD card due to
>>> wear, and is much faster, this isn't the problem. Basically up to a
>>> max of 50% of the RAM will be allocated to swap using lz4 compression
>>> and we generally see a 4-5 times compression ratio.
>> How can I 'see' my swap partition? Free shows a 487304B swap with none
>> used. Yet.
>>
>> Nothing in fstab. Guess I better read up on zram.
> It's created as part of the zram-swap service. The swapon (no options)
> will show swap details, the zramctl cmd (no options) will show you
> size, utiliation, compression ratios etc.
>
>
OK. I took a look at the output of these commands and how zram is
running as a service.
Pretty neat, overall.
Though I saw where that system start date may play a longterm problem:
cat /etc/zram.conf
# The factor is the percentage of total system RAM to allocate to the
ZRAM block device(s).
FACTOR=2
# cat /etc/systemd/system/swap.target.wants/zram-swap.service
[Unit]
Description=Enable compressed swap in memory using zram
DefaultDependencies=no
Before=swap.target
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStartSec=30sec
ExecStart=/usr/sbin/zramstart
ExecStop=/usr/sbin/zramstop
[Install]
WantedBy=swap.target
# systemctl -l --no-pager status zram-swap
\u25cf zram-swap.service - Enable compressed swap in memory using zram
Loaded: loaded (/usr/lib/systemd/system/zram-swap.service; enabled;
vendor preset: disabled)
Active: active (exited) since Fri 2018-06-22 11:12:12 EDT; 3 months
16 days ago
Process: 437 ExecStart=/usr/sbin/zramstart (code=exited,
status=0/SUCCESS)
Main PID: 437 (code=exited, status=0/SUCCESS)
Jun 22 11:12:12 localhost zramstart[437]: Setting up swapspace version
1, size = 475.9 MiB (498999296 bytes)
Jun 22 11:12:12 localhost zramstart[437]: no label,
UUID=ba3bf62f-7bb0-4295-ad8c-2d26b000c3f8
Jun 22 11:12:12 localhost zramstart[437]: Activated ZRAM swap device of
499 MB
Jun 22 11:12:12 localhost systemd[1]: Started Enable compressed swap in
memory using zram.
Active for 3 months and 16 days? Hardly. :)
Perhaps for F30, you can grab the timestamp of the Chrony drift file for
the startup rather than whereever you get this Jun 22 date?
It's probably the date the image was created.
Patches are welcome!