server: tweak postgresql to more caching
This commit is contained in:
parent
f750968224
commit
b37e0cdda5
47
disko/nas_luks.nix
Normal file
47
disko/nas_luks.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
sda = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "NAS-RAID";
|
||||||
|
askPassword = true;
|
||||||
|
# disable settings.keyFile if you want to use interactive password entry
|
||||||
|
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f -L NAS-RAID" ];
|
||||||
|
subvolumes = {
|
||||||
|
"@" = {
|
||||||
|
mountpoint = "/mnt/Pluto";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
|
||||||
|
};
|
||||||
|
"@/Backups";
|
||||||
|
"@/Media";
|
||||||
|
"@/Games";
|
||||||
|
"@/IT";
|
||||||
|
"@/Rest";
|
||||||
|
"@snapshots" = {
|
||||||
|
mountpoint = "/mnt";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -12,8 +12,9 @@
|
|||||||
max_connections = 200;
|
max_connections = 200;
|
||||||
listen_addresses = "localhost";
|
listen_addresses = "localhost";
|
||||||
password_encryption = "scram-sha-256";
|
password_encryption = "scram-sha-256";
|
||||||
shared_buffers = "512MB";
|
shared_buffers = "2GB";
|
||||||
work_mem = "8MB";
|
work_mem = "1GB";
|
||||||
|
maintence_work_mem = "500MB"
|
||||||
autovacuum_work_mem = -1;
|
autovacuum_work_mem = -1;
|
||||||
min_wal_size = "1GB";
|
min_wal_size = "1GB";
|
||||||
max_wal_size = "4GB";
|
max_wal_size = "4GB";
|
||||||
|
Loading…
Reference in New Issue
Block a user