cluster/services/ipfs: split io tweaks
This commit is contained in:
parent
f41265ed00
commit
4fb9373f1f
3 changed files with 26 additions and 23 deletions
|
@ -26,6 +26,7 @@
|
|||
node = [ "VEGAS" "prophet" ];
|
||||
clusterPeer = [ "VEGAS" "prophet" ];
|
||||
gateway = [ "VEGAS" ];
|
||||
io-tweaks = [ "VEGAS" ];
|
||||
};
|
||||
nixos = {
|
||||
node = [
|
||||
|
@ -38,6 +39,7 @@
|
|||
clusterPeer = [
|
||||
./cluster.nix
|
||||
];
|
||||
io-tweaks = ./io-tweaks.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,29 +6,6 @@ let
|
|||
gw = config.links.ipfsGateway;
|
||||
in
|
||||
{
|
||||
systemd.services.ipfs = {
|
||||
serviceConfig = {
|
||||
LimitNOFILE = 524288;
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.slices.remotefshost.sliceConfig = {
|
||||
IOWeight = 5;
|
||||
IOReadIOPSMax = [
|
||||
"/dev/sda 100"
|
||||
"/dev/sdb 100"
|
||||
];
|
||||
IOWriteIOPSMax = [
|
||||
"/dev/sda 100"
|
||||
"/dev/sdb 100"
|
||||
];
|
||||
IODeviceLatencyTargetSec = [
|
||||
"/dev/sda 500ms"
|
||||
"/dev/sdb 500ms"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ cfg.group ];
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
|
|
24
cluster/services/ipfs/io-tweaks.nix
Normal file
24
cluster/services/ipfs/io-tweaks.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
systemd.services.ipfs = {
|
||||
serviceConfig = {
|
||||
LimitNOFILE = 524288;
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.slices.remotefshost.sliceConfig = {
|
||||
IOWeight = 5;
|
||||
IOReadIOPSMax = [
|
||||
"/dev/sda 100"
|
||||
"/dev/sdb 100"
|
||||
];
|
||||
IOWriteIOPSMax = [
|
||||
"/dev/sda 100"
|
||||
"/dev/sdb 100"
|
||||
];
|
||||
IODeviceLatencyTargetSec = [
|
||||
"/dev/sda 500ms"
|
||||
"/dev/sdb 500ms"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue