Giter VIP home page Giter VIP logo

neveridledockerarm's Introduction

neveridleDocker

This is the implementation of layou233's amazing NeverIdle script for Easypanel/docker on ARM64 Oracle Cloud Instances.

Docker env VAR config ref: https://github.com/layou233/NeverIdle

  • default VAR=-cp 0.15 -m 0.1 -n 4h

Why

Recently, some Oracle Cloud Free Tier users received an email stating that their compute instances were identified as idle and would be stopped in one week. Since Oracle Free Cloud is by far the best offer for test servers, some users may not want to lose their machines.

This script is made to run on Easypanel, a docker-based control panel, and helps to avoid the instance from being considered idle, thus preventing Oracle from deleting your machine. It makes your CPU waste 20% of processor power on a very low priority, which means that it will only waste if other more important processes are not using the machine. It also wastes your 2GB of memory and uses a speed test to consume about 20% of network, all in a docker image. Therefore, you don't have to use the screen attach and detach solution suggested on the layou233 solution.

Installation

To install the script on Easypanel, create a new app, add this GitHub address, and deploy it. image

  • 一键脚本 One click to go
bash <(curl -s -L https://gist.githubusercontent.com/Ansen/e45320205faf5786d3282ac880f20bab/raw/onekey-NeverIdle.sh)

MJJ 们估计会喜欢这个。感谢脚本作者 @Ansen

默认执行下面的命令,当然肯定没法覆盖所有的需求。
比如 AMD 没有 2G 内存,也没有浪费内存的要求。
所以依然建议各位自己安装,也是非常便捷迅速的。

Usage

从 Release 下载可执行文件。注意区分 amd64 和 arm64。

在服务器上启动一个 screen,然后执行本程序,用法自己搜。

命令参数:

./NeverIdle -cp 0.15 -m 2 -n 4h

其中:

-c 指启用 CPU 定期浪费,后面跟随每次浪费的间隔时间。
如每 12 小时 23 分钟 34 秒浪费一次,则为 -c 12h23m34s。按照格式填。

-cp 指启用粗粒度的 CPU 百分比浪费,浪费率将随机器的使用水平实时变化。
如最大浪费20%的CPU,则为 -cp 0.2。百分比的取值范围 [0, 1] 并且注意不要和 -c 一起使用。

-m 指启用浪费的内存量,后面是一个数字,单位为 GiB。
启动后会占用对应量的内存,并且保持不会释放,直到手动杀死进程。

-n 指启用网络定期浪费,后面跟随每次浪费的间隔时间。
格式同 CPU。会定期执行一次 Ookla Speed Test(还会输出结果哦!)

-t 指设置网络定期浪费的并发连接数。
默认为10个,值越大消耗的资源越多,一般情况不需要更改。

-p 指设置该进程优先级,后跟随一个优先级数值。不指定则默认使用本平台的最低优先级。
对于 UNIX-like 系统(如 Linux、FreeBSD 和 macOS),数值取值范围为 [-20,19] ,数字越大优先级越低。
对于 Windows ,参见 官方文档
建议不进行指定,默认即为最低优先级,为其它所有进程让路。

启动该程序后即立刻执行一次你配置的所有功能,可以观察效果。

neveridledockerarm's People

Contributors

takaj avatar baunilhaeu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.