Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Prince
PrivateStorageio
Commits
3eb343b1
Unverified
Commit
3eb343b1
authored
Jun 11, 2020
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
put this limit config in the right place
parent
baa94a31
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nixos/modules/tahoe.nix
+36
-32
36 additions, 32 deletions
nixos/modules/tahoe.nix
with
36 additions
and
32 deletions
nixos/modules/tahoe.nix
+
36
−
32
View file @
3eb343b1
...
@@ -128,38 +128,6 @@ in
...
@@ -128,38 +128,6 @@ in
ExecStart
=
''
ExecStart
=
''
${
settings
.
package
}
/bin/tahoe run
${
lib
.
escapeShellArg
nodedir
}
-n -l- --pidfile=
${
lib
.
escapeShellArg
pidfile
}
${
settings
.
package
}
/bin/tahoe run
${
lib
.
escapeShellArg
nodedir
}
-n -l- --pidfile=
${
lib
.
escapeShellArg
pidfile
}
''
;
''
;
# The rlimit on number of open files controls how many
# connections a particular storage server can accept (factoring
# in the number of non-connection files the server needs open -
# eg for logging, reading and writing shares, etc).
#
# Once the maximum number of open files, as controlled by rlimit
# is reached, service suffers dramatically. New connections
# cannot be accepted. Shares cannot be read or written.
#
# The default limit on open files is 8192 (2^13). This could
# easily be raised. If it is raised to 2^16 then the rlimit is
# approximately equal to the limit imposed by TCP (which only
# has around 2^16 ports available per IP address). If we want
# each connection to also be able to read or write a share file,
# a limit of 2^15 would allow this. Then, we should scale the
# limit linearly with the number of IP addresses available. If
# the service can be reached on 2 IP addresses, allow twice as
# many files (2^15 * 2 = 2^16). If it can be reached on 3 IP
# addresses, (2^16 * 3). etc.
#
# Python also sometimes wants to open files as a side effect of
# other things going. For example, if there's a traceback, it
# opens the source files to read lines to put into the
# traceback. If random numbers are generated, /dev/urandom
# might be opened, etc. There is also some fixed overhead for
# listening ports and such. This currently doesn't factor into
# our choice but perhaps it could somehow.
#
# There is only one IPv4 address assigned to each host right
# now. So it makes sense to have the limit be 2^15 right now.
LimitNOFILE
=
32768
;
};
};
preStart
=
''
preStart
=
''
if [ ! -d
${
lib
.
escapeShellArg
nodedir
}
]; then
if [ ! -d
${
lib
.
escapeShellArg
nodedir
}
]; then
...
@@ -223,6 +191,42 @@ in
...
@@ -223,6 +191,42 @@ in
ExecStart
=
''
ExecStart
=
''
${
settings
.
package
}
/bin/tahoe run
${
nodedir
}
-n -l- --pidfile=
${
pidfile
}
${
settings
.
package
}
/bin/tahoe run
${
nodedir
}
-n -l- --pidfile=
${
pidfile
}
''
;
''
;
# The rlimit on number of open files controls how many
# connections a particular storage server can accept (factoring
# in the number of non-connection files the server needs open -
# eg for logging, reading and writing shares, etc).
#
# Once the maximum number of open files, as controlled by rlimit
# is reached, service suffers dramatically. New connections
# cannot be accepted. Shares cannot be read or written.
#
# The default limit on open files is fairly low, perhaps 1024
# (2^10) or 8192 (2^13). This can easily be raised. If it is
# raised to 2^16 then the rlimit is approximately equal to the
# limit imposed by TCP (which only has around 2^16 ports
# available per IP address). If we want each connection to also
# be able to read or write a share file, a limit of 2^15 would
# allow this. Then, we should scale the limit linearly with the
# number of IP addresses available. If the service can be
# reached on 2 IP addresses, allow twice as many files (2^15 * 2
# = 2^16). If it can be reached on 3 IP addresses, (2^16 *
# 3). etc.
#
# Python also sometimes wants to open files as a side effect of
# other things going. For example, if there's a traceback, it
# opens the source files to read lines to put into the
# traceback. If random numbers are generated, /dev/urandom
# might be opened, etc. There is also some fixed overhead for
# listening ports and such. This currently doesn't factor into
# our choice but perhaps it could somehow.
#
# There is only one IPv4 address assigned to each host right
# now. So it makes sense to have the limit be 2^15 right now.
LimitNOFILE
=
32768
;
# Tahoe-LAFS has no logic to raise soft limit to hard limit so
# make it the same.
LimitNOFILESoft
=
32768
;
};
};
preStart
=
preStart
=
let
let
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment