Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
cf62bd2e
Unverified
Commit
cf62bd2e
authored
Nov 29, 2018
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: max out the OS file allowance, don't cap to 2K
parent
01371469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
flags.go
cmd/utils/flags.go
+3
-8
No files found.
cmd/utils/flags.go
View file @
cf62bd2e
...
...
@@ -824,17 +824,12 @@ func setIPC(ctx *cli.Context, cfg *node.Config) {
// makeDatabaseHandles raises out the number of allowed file handles per process
// for Geth and returns half of the allowance to assign to the database.
func
makeDatabaseHandles
()
int
{
limit
,
err
:=
fdlimit
.
Current
()
limit
,
err
:=
fdlimit
.
Maximum
()
if
err
!=
nil
{
Fatalf
(
"Failed to retrieve file descriptor allowance: %v"
,
err
)
}
if
limit
<
2048
{
if
err
:=
fdlimit
.
Raise
(
2048
);
err
!=
nil
{
Fatalf
(
"Failed to raise file descriptor allowance: %v"
,
err
)
}
}
if
limit
>
2048
{
// cap database file descriptors even if more is available
limit
=
2048
if
err
:=
fdlimit
.
Raise
(
uint64
(
limit
));
err
!=
nil
{
Fatalf
(
"Failed to raise file descriptor allowance: %v"
,
err
)
}
return
limit
/
2
// Leave half for networking and other stuff
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment