Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_BJmsYTVT.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
SleepyCPU - 墨喵 Minecraft 资源
SleepyCPU 图标

SleepyCPU

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/sleepycpu
资源信息

Minecraft 版本: 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8

平台: folia paper purpur

资源介绍

SleepyCPU

Reduce server CPU usage automatically when your Minecraft server is empty.

SleepyCPU detects when no players are online and temporarily slows down server activity. It optionally unloads chunks and nudges the JVM to free memory. As soon as a player joins, normal operation resumes.

Features

  • Automatically enters a low-CPU mode when the server is empty
  • Configurable delay between server ticks while idle (sleepTicks)
  • Optional chunk unloading (unloadChunks) with save-on-unload toggle
  • Configurable cleanup interval to control how often chunk unload + GC occurs
  • Lightweight: no dependencies and single permission node

How it works

When the player count reaches 0, SleepyCPU:

  1. Saves all worlds safely using region-aware scheduling
  2. Sleeps between tick cycles by a configurable number of ticks
  3. Periodically (configurable interval) unloads chunks per world and triggers a GC hint

When a player joins, counters reset and the server resumes normal throughput.

Configuration

  • Location: server-root/sleepycpu.yml
  • Keys:
    • settings.enabled: Master switch for low-CPU mode (true/false)
    • settings.sleepTicks: Delay between idle cycles in ticks (1 tick = 50ms)
    • settings.unloadChunks: Unload chunks while idle (true/false)
    • settings.saveChunksOnUnload: Save chunks when unloading (true/false)
    • settings.cleanupIntervalTicks: Idle cycles between chunk unload + GC
  • After editing, run /sleepycpu reload or restart the server

Commands

  • /sleepycpu help — Show command info
  • /sleepycpu toggle — Enable/disable low-CPU mode
  • /sleepycpu status — Display current status and settings
  • /sleepycpu reload — Reload configuration from disk
  • /sleepycpu delay — Set sleepTicks
  • /sleepycpu cleanupinterval — Set cleanupIntervalTicks
  • /sleepycpu unloadchunks <true|false> — Toggle unloadChunks
  • /sleepycpu saveonunload <true|false> — Toggle saveChunksOnUnload

Alias: /scpu

Permissions

  • sleepycpu.admin — Access to all SleepyCPU commands (default: OP)
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Optifine的文言文翻译

价格:0 墨喵币
下载量:0

查看详情
秘银工艺

价格:0 墨喵币
下载量:0

查看详情
AnvilMod

价格:0 墨喵币
下载量:0

查看详情
Ki's Custom Hats

价格:0 墨喵币
下载量:0

查看详情