PageSourceSearch

https://d7y.io/assets/js/dae0179c.a79b3a59.js

js d7y.io collected 2026-10-03 22:36:51 UTC 8,597 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkd7y_io||=[]).push([[6637],{51229(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"reference/configuration/scheduler","title":"Scheduler","description":"Configure Scheduler YAML File","source":"@site/versioned_docs/version-v2.3.0/reference/configuration/scheduler.md","sourceDirName":"reference/configuration","slug":"/reference/configuration/scheduler/","permalink":"/docs/v2.3.0/reference/configuration/scheduler/","draft":false,"unlisted":false,"editUrl":"https://github.com/dragonflyoss/d7y.io/edit/main/docs/reference/configuration/scheduler.md","tags":[],"version":"v2.3.0","lastUpdatedBy":"Gaius","lastUpdatedAt":1751364068000,"frontMatter":{"id":"scheduler","title":"Scheduler","slug":"/reference/configuration/scheduler/"},"sidebar":"docs","previous":{"title":"Manager","permalink":"/docs/v2.3.0/reference/configuration/manager/"},"next":{"title":"Dfdaemon","permalink":"/docs/v2.3.0/reference/configuration/client/dfdaemon/"}}');var i=r(74848),o=r(28453);const s={id:"scheduler",title:"Scheduler",slug:"/reference/configuration/scheduler/"},a=void 0,l={},c=[{value:"Configure Scheduler YAML File",id:"configure-scheduler-yaml-file",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"configure-scheduler-yaml-file",children:"Configure Scheduler YAML File"}),"\n",(0,i.jsxs)(n.p,{children:["The default path for the scheduler yaml configuration file is ",(0,i.jsx)(n.code,{children:"/etc/dragonfly/scheduler.yaml"})," in linux,\nand the default path is ",(0,i.jsx)(n.code,{children:"$HOME/.dragonfly/config/scheduler.yaml"})," in darwin."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# Server scheduler instance configuration.\nserver:\n# # Access ip for other services,\n# # when local ip is different with access ip, advertiseIP should be set.\n# advertiseIP: 127.0.0.1\n# # Access port for other services,\n# # when local ip is different with access port, advertisePort should be set.\n# advertisePort: 8002\n# # Listen ip.\n# listenIP: 0.0.0.0\n# Port is the ip and port scheduler server listens on.\n  port: 8002\n# # GRPC server tls configuration.\n# tls:\n#   # CA certificate file path for mTLS.\n#   caCert: /etc/ssl/certs/ca.crt\n#   # Certificate file path for mTLS.\n#   cert: /etc/ssl/certs/server.crt\n#   # Key file path for mTLS.\n#   key: /etc/ssl/private/server.pem\n# # Server host.\n# host: localhost\n  # WorkHome is working directory.\n  # In linux, default value is /usr/local/dragonfly.\n  # In macos(just for testing), default value is /Users/$USER/.dragonfly.\n  workHome: \'\'\n  # logLevel specifies the logging level for the scheduler.\n  # Default: "info"\n  # Supported values: "debug", "info", "warn", "error", "panic", "fatal"\n  logLevel: "info"\n  # logDir is the log directory.\n  # In linux, default value is /var/log/dragonfly.\n  # In macos(just for testing), default value is /Users/$USER/.dragonfly/logs.\n  logDir: \'\'\n  # cacheDir is dynconfig cache directory.\n  # In linux, default value is /var/cache/dragonfly.\n  # In macos(just for testing), default value is /Users/$USER/.dragonfly/cache.\n  cacheDir: \'\'\n  # pluginDir is the plugin directory.\n  # In linux, default value is /usr/local/dragonfly/plugins.\n  # In macos(just for testing), default value is /Users/$USER/.dragonfly/plugins.\n  pluginDir: \'\'\n  # dataDir is the directory.\n  # In linux, default value is /var/lib/dragonfly.\n  # In macos(just for testing), default value is /Users/$USER/.dragonfly/data.\n  dataDir: \'\'\n\n# Scheduler policy configuration.\nscheduler:\n  # Algorithm configuration to use different scheduling algorithms,\n  # default configuration supports "default" and "ml"\n  # "default" is the rule-based scheduling algorithm,\n  # "ml" is the machine learning scheduling algorithm\n  # It also supports user plugin extension, the algorithm value is "plugin",\n  # and the compiled `d7y-scheduler-plugin-evaluator.so` file is added to\n  # the dragonfly working directory plugins.\n  algorithm: default\n  # backToSourceCount is single task allows the peer to back-to-source count.\n  backToSourceCount: 200\n  # retryBackToSourceLimit reaches the limit, then the peer back-to-source.\n  retryBackToSourceLimit: 3\n  # Retry scheduling limit times.\n  retryLimit: 5\n  # Retry scheduling interval.\n  retryInterval: 400ms\n  # GC metadata configuration.\n  gc:\n    # pieceDownloadTimeout is the timeout of downloading piece.\n    pieceDownloadTimeout: 30m\n    # peerGCInterval is the interval of peer gc.\n    peerGCInterval: 5m\n    # peerTTL is the ttl of peer. If the peer has been downloaded by other peers,\n    # then PeerTTL will be reset\n    peerTTL: 720h\n    # taskGCInterval is the interval of task gc. If all the peers have been reclaimed in the task,\n    # then the task will also be reclaimed.\n    taskGCInterval: 30m\n    # hostGCInterval is the interval of host gc.\n    hostGCInterval: 5m\n    # hostTTL is time to live of host. If host announces message to scheduler,\n    # then HostTTl will be reset.\n    hostTTL: 1h\n\n# Database info used for server.\ndatabase:\n  # Redis configuration.\n  redis:\n    # Redis addresses.\n    addrs:\n      - redis-service:6379\n    # Redis sentinel master name.\n    masterName: \'\'\n    # Redis username.\n    username: \'\'\n    # Redis password.\n    password: \'\'\n    # Redis broker DB.\n    brokerDB: 1\n    # Redis backend DB.\n    backendDB: 2\n\n# Dynamic data configuration.\ndynConfig:\n  # Dynamic config refresh interval.\n  refreshInterval: 1m\n\n# Scheduler host configuration.\nhost:\n  # idc is the idc of scheduler instance.\n  idc: \'\'\n  # location is the location of scheduler instance.\n  location: \'\'\n\n# Manager configuration.\nmanager:\n  # addr is manager access address.\n  addr: manager-service:65003\n  # schedulerClusterID cluster id to which scheduler instance belongs.\n  schedulerClusterID: 1\n  # keepAlive keep alive configuration.\n  keepAlive:\n    # KeepAlive interval.\n    interval: 5s\n# # GRPC client tls configuration.\n# tls:\n#   # CA certificate file path for mTLS.\n#   caCert: /etc/ssl/certs/ca.crt\n#   # Certificate file path for mTLS.\n#   cert: /etc/ssl/certs/client.crt\n#   # Ke
1y file path for mTLS.\n#   key: /etc/ssl/private/client.pem\n\n# Seed peer configuration.\nseedPeer:\n  # Scheduler enable seed peer as P2P peer,\n  # if the value is false, P2P network will not be back-to-source through\n  # seed peer but by peer and preheat feature does not work.\n  enable: true\n\n# Machinery async job configuration,\n# see https://github.com/RichardKnop/machinery.\njob:\n  # Scheduler enable job service.\n  enable: true\n  # Number of workers in global queue.\n  globalWorkerNum: 500\n  # Number of workers in scheduler queue.\n  schedulerWorkerNum: 500\n  # Number of workers in local queue.\n  localWorkerNum: 1000\n\n# Enable prometheus metrics.\nmetrics:\n  # Scheduler enable metrics service.\n  enable: true\n  # Metrics service address.\n  addr: \':8000\'\n  # Enable host metrics.\n  enableHost: false\n\nnetwork:\n  # Enable ipv6.\n  enableIPv6: false\n\n# Console shows log on console.\nconsole: true\n\n# Listen port for pprof, default is -1 (meaning disabled).\npprofPort: -1\n\n# tracing is the tracing configuration for dfdaemon.\n# tracing:\n#   # Protocol specifies the communication protocol for the tracing server.\n#   # Supported values: "http", "https", "grpc" (default: None).\n#   # This determines how tracing logs are transmitted to the server.\n#   protocol: grpc\n#   # endpoint is the endpoint to report tracing log, example: "localhost:4317".\n#   endpoint: localhost:4317\n#   # path is the path to report tracing log, example: "/v1/traces" if the protocol is "http" or "https".\n#   path: "/v1/traces"\n#   # headers is the grpc\'s headers to send with tracing log.\n#   headers: {}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453(e,n,r){r.d(n,{R:()=>s,x:()=>a});var t=r(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.