Configure swap space on NBD volume
Using zram to compress pages did not provide enough memory to run Firefox, Node, and Python for an extended period of time. Here's hoping swap-on-NBD will be fast and reliable enough to work. Note that systemd's default behavior with respect to swap areas is to enable them all rather early in the boot process, before the network is fully configured. As such, we have to use the *noauto* flag to disable the default dependencies and add our own in a later target.pull/1/head
parent
1e96609ebc
commit
14d0cdcec1
|
@ -2,3 +2,4 @@ tmpfs /var/lib/rsyslog tmpfs defaults 0 0
|
||||||
tmpfs /var/log tmpfs defaults 0 0
|
tmpfs /var/log tmpfs defaults 0 0
|
||||||
tmpfs /var/lib/systemd tmpfs defaults 0 0
|
tmpfs /var/lib/systemd tmpfs defaults 0 0
|
||||||
tmpfs /var/lib/NetworkManager tmpfs defaults 0 0
|
tmpfs /var/lib/NetworkManager tmpfs defaults 0 0
|
||||||
|
/dev/nbd1 swap swap noauto,x-systemd.makefs 0 0
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
nbd1 pxe0.pyrocufflink.blue basementhud-swap
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/lib/systemd/system/nbd@.service
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Unit]
|
||||||
|
# All swap units have a default `Before=swap.target` dependency. This
|
||||||
|
# does not work for swap devices using NBD, because `swap.target` is
|
||||||
|
# reached before the network is up.
|
||||||
|
DefaultDependencies=no
|
|
@ -0,0 +1 @@
|
||||||
|
../dev-nbd1.swap
|
Loading…
Reference in New Issue