RRD database is very hard on SD cards and will wear them out completely in less than a year.
But data is not that big and RPI has enough RAM to put those files on tmpfs. Therefor the suggestion:
mount tmpfs in /var/lib/pymc_repeater.tmpfs (add tmpfs /var/lib/pymc_repeater.tmpfs tmpfs defaults,size=100m 0 0 to fstab).
create symlink to repeater.db and metrics.rrd pointing to tmpfs
in a shutdown script add a command to preserve tmpfs contents in pymc_repeater.preserve
in a startup script add a command to restore tmpfs out of pymc_repeater.preserve
RRD database is very hard on SD cards and will wear them out completely in less than a year.
But data is not that big and RPI has enough RAM to put those files on tmpfs. Therefor the suggestion:
1. mount tmpfs in /var/lib/pymc_repeater.tmpfs (add `tmpfs /var/lib/pymc_repeater.tmpfs tmpfs defaults,size=100m 0 0` to fstab).
2. create symlink to repeater.db and metrics.rrd pointing to tmpfs
3. in a shutdown script add a command to preserve tmpfs contents in pymc_repeater.preserve
4. in a startup script add a command to restore tmpfs out of pymc_repeater.preserve
<!-- github-sync-id:4223426958 -->
I think it would be more useful to do this in docker compose. There you can define a tmpfs eg:
tmpfs:
- /tmp:size=64m,mode=1777
I think it would be more useful to do this in docker compose. There you can define a tmpfs eg:
```
tmpfs:
- /tmp:size=64m,mode=1777
```
<!-- github-comment-id:5388163881 -->
I think it would be more useful to do this in docker compose. There you can define a tmpfs eg:
tmpfs:
- /tmp:size=64m,mode=1777
Most of modern linuxes already mount /tmp in memfs. But in order to place those files there they have to be at least in a separate directory (or to be able to define their location in config). Right now i can only move them to memfs via hackery by creating symlinks in a startup script and that constantly breaks cause symlinks get overwritten.
> I think it would be more useful to do this in docker compose. There you can define a tmpfs eg:
>
> ```
> tmpfs:
> - /tmp:size=64m,mode=1777
>
Most of modern linuxes already mount /tmp in memfs. But in order to place those files there they have to be at least in a separate directory (or to be able to define their location in config). Right now i can only move them to memfs via hackery by creating symlinks in a startup script and that constantly breaks cause symlinks get overwritten.
<!-- github-comment-id:5390938086 -->
I'd like to see an option for this, too. Not just the RRD files, but also the raw packets that currently get stored in the sqllite database. Keep adverts, because that's how the node database is maintained. But no other packet types need persistence. Any mesh analysis will be done via cloud analyzers like CoreScope/Beacon/etc, not in openHop itself, since it doesn't see the mesh at large.
So as @a1j points out, there is some data that does need persistence, and other data that does not. Currently, openHop does not provide a way to split these things out such that the non-persistence items can live in tmpfs/zram.
I'd like to see an option for this, too. Not just the RRD files, but also the raw packets that currently get stored in the sqllite database. Keep adverts, because that's how the node database is maintained. But no other packet types need persistence. Any mesh analysis will be done via cloud analyzers like CoreScope/Beacon/etc, not in openHop itself, since it doesn't see the mesh at large.
So as @a1j points out, there is some data that does need persistence, and other data that does not. Currently, openHop does not provide a way to split these things out such that the non-persistence items can live in tmpfs/zram.
<!-- github-comment-id:5485723673 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
RRD database is very hard on SD cards and will wear them out completely in less than a year.
But data is not that big and RPI has enough RAM to put those files on tmpfs. Therefor the suggestion:
tmpfs /var/lib/pymc_repeater.tmpfs tmpfs defaults,size=100m 0 0to fstab).I think it would be more useful to do this in docker compose. There you can define a tmpfs eg:
Most of modern linuxes already mount /tmp in memfs. But in order to place those files there they have to be at least in a separate directory (or to be able to define their location in config). Right now i can only move them to memfs via hackery by creating symlinks in a startup script and that constantly breaks cause symlinks get overwritten.
I'd like to see an option for this, too. Not just the RRD files, but also the raw packets that currently get stored in the sqllite database. Keep adverts, because that's how the node database is maintained. But no other packet types need persistence. Any mesh analysis will be done via cloud analyzers like CoreScope/Beacon/etc, not in openHop itself, since it doesn't see the mesh at large.
So as @a1j points out, there is some data that does need persistence, and other data that does not. Currently, openHop does not provide a way to split these things out such that the non-persistence items can live in tmpfs/zram.