|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
import argparse
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
import configargparse
|
|
|
|
|
from hivemind.proto.runtime_pb2 import CompressionType
|
|
|
|
|
from hivemind.utils.limits import increase_file_limit
|
|
|
|
|
from hivemind.utils import limits
|
|
|
|
|
from hivemind.utils.logging import get_logger
|
|
|
|
|
from humanfriendly import parse_size
|
|
|
|
|
|
|
|
|
@ -127,9 +128,9 @@ def main():
|
|
|
|
|
group.add_argument('--new_swarm', action='store_true',
|
|
|
|
|
help='Start a new private swarm (i.e., do not connect to any initial peers)')
|
|
|
|
|
|
|
|
|
|
parser.add_argument('--increase_file_limit', action='store_true',
|
|
|
|
|
help='On *nix, this will increase the max number of processes '
|
|
|
|
|
'a server can spawn before hitting "Too many open files"; Use at your own risk.')
|
|
|
|
|
parser.add_argument('--increase_file_limit', type=int, default=4096,
|
|
|
|
|
help='On *nix, increase the max number of files a server can open '
|
|
|
|
|
'before hitting "Too many open files" (set to zero to keep the system limit)')
|
|
|
|
|
parser.add_argument('--stats_report_interval', type=int, required=False,
|
|
|
|
|
help='Interval between two reports of batch processing performance statistics')
|
|
|
|
|
|
|
|
|
@ -185,8 +186,10 @@ def main():
|
|
|
|
|
|
|
|
|
|
args["startup_timeout"] = args.pop("daemon_startup_timeout")
|
|
|
|
|
|
|
|
|
|
if args.pop("increase_file_limit"):
|
|
|
|
|
increase_file_limit()
|
|
|
|
|
file_limit = args.pop("increase_file_limit")
|
|
|
|
|
if file_limit:
|
|
|
|
|
limits.logger.setLevel(logging.WARNING)
|
|
|
|
|
limits.increase_file_limit(file_limit, file_limit)
|
|
|
|
|
|
|
|
|
|
compression_type = args.pop("compression").upper()
|
|
|
|
|
compression = getattr(CompressionType, compression_type)
|
|
|
|
|