Coder Social home page Coder Social logo

lemonbench's Introduction

LemonBench

A simple Linux Benchmark Utility developed using Shell Script.

How To Use

Document Language: English (Coming Soon) | 简体中文

Quick Start

wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast

(or)

curl -fsL https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast

Requirements

系统发行版:CentOS 7/8, Debian 11/12+, Ubuntu 18.04/20.04/22.04+

处理器架构:x86_64 (amd64), aarch64 (arm64)

需要 root 权限 运行 (直接root或者sudo root)

⚠️ 由于LemonBench连续高强度测试的特性,在某些低资源或主机商限制严格的环境下,连续长时间100%占用计算资源/网络资源,可能会被视作滥用(Abuse)。建议在以上环境中谨慎运行LemonBench。

Get Started

LemonBench 支持以下项目的基准测试:

  • 系统信息基准模块
    • CPU基准信息 (CPU型号、缓存大小、核心数量配置等)
    • 虚拟化信息 (当前系统所使用的虚拟化、VT-x/SVM开启检测、IOMMU开启检测)
    • 内存信息 (内存、交换分区)
    • 磁盘信息 (检测根挂载点所在分区或磁盘)
    • 系统发行版信息 (发行版名称、内核版本)
  • 网络信息基准模块
    • IPv4 网络信息 (IP地址、GeoIP信息,以默认路由网卡为准)
    • IPv6 网络信息 (IP地址、GeoIP信息,以默认路由网卡为准)
  • 流媒体解锁测试模块
    • Netflix
    • HBO Now
    • Youtube Premium
    • Tiktok Region
    • BBC iPlayer
    • NicoNico
    • 公主连结Re:dive (Princonne Re:dive) 日服
    • 赛马娘 (Pretty Derby) 日服
    • 巴哈姆特動畫瘋
    • 哔哩哔哩 (国内限定/港澳台地区限定/****地区限定)
    • Steam 汇率区
  • CPU基准性能测试模块
    • 1 线程测试 (快速测试 5秒 1次/完整测试 30秒 3次平均值)
    • 半线程测试 (如4核心8线程,则运行4线程测试)
    • 全线程测试 (所有可用线程)
    • 超线程倍率检测 (以 1线程测试 作为基准)
  • 磁盘基准性能测试模块 (基于FIO Direct 32 队列深度)
    • 写入测试 (4K - 模拟数据库操作)
    • 读取测试 (4K - 模拟数据库操作)
    • 写入测试 (128K - 模拟大文件读写)
    • 读取测试 (128K - 模拟大文件读写)
  • 网络速率基准测试模块 (基于Ookla Speedtest)
    • 默认节点 (Speedtest 最近节点)
    • 快速模式:国内三大运营商(联通/移动/电信)各 1 个
    • 完整模式:国内三大运营商(联通/移动/电信)各 3 个 + 海外运营商扩展测试
  • 路由追踪基准测试 (基于 NextTrace)
    • 快速模式:国内主流运营商 (联通-AS4837/移动-AS9808/电信-AS4134/联通CUII-AS9929/电信CN2-AS4812/鹏博士长宽家用网络/鹏博士长宽商用网络/教育网CERNET1-AS4538/教育网CERNET2-AS4538/科技网CSTNET-AS7497/广电网络-AS7641)
    • 完整模式:国内主流运营商 + 海外运营商扩展测试

Xpack 增强扩展包 (Coming soon)

针对 LemonBench 运行过程中各平台环境的特异性,可启用Xpack功能包以扩展LemonBench的检测能力。Xpack 增强扩展包可额外检测如下项目:

  • 公有云平台虚拟机增强检测
    • 实例信息检测 (实例ID、网卡信息等)
    • 实例类型检测 (如腾讯云 SA2.SMALL)
    • 可用区信息检测
  • 物理服务器增强检测
    • 服务器型号检测
    • 服务器BIOS信息检测
    • Dell 服务器 Service Tag 检测
  • (未完待续)

LemonBench 使用说明

LemonBench 作为非专业性能基准工具,测试结果仅供参考。不同的 LemonBench 版本之间性能测试结果不具有可比性。跨处理器架构之间部分测试结果(如CPU性能测试)不具有直接可比性。

在部分VPS主机商提供的虚拟机运行 LemonBench 之前,请直接向官方,或向社群确认是否允许长时间占用计算资源或网络带宽资源(LemonBench快速测试需要占用约5分钟的CPU资源,以及约2分钟的网络带宽资源;完整测试需要占用约15分钟的CPU资源,以及约10分钟的网络带宽资源),避免因长时间占用共享(Fair-Share)资源导致被主机商封禁。

由于部分音视频资源提供方对于网站代码可能会随时变动,流媒体解锁测试部分结果仅供参考。请以实际是否可以直接访问作为最终测试结果。

lemonbench's People

Contributors

ilemonra1n avatar tsosunchia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lemonbench's Issues

脱胎于centOS的Almalinux 8 x86_64无法运行脚本

[root@perfect-pods-1 ~]# cat /proc/version
Linux version 4.18.0-348.el8.x86_64 ([email protected]) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-3) (GCC)) #1 SMP Tue Nov 9 06:28:28 EST 2021
[root@perfect-pods-1 ~]# curl -fsL https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
[2024/02/01 02:09:13] 
[2024/02/01 02:09:13]    __                       ___               __  
[2024/02/01 02:09:13]   / /  ___ __ _  ___  ___  / _ )___ ___  ____/ /  
[2024/02/01 02:09:13]  / /__/ -_)  ' \/ _ \/ _ \/ _  / -_) _ \/ __/ _ \ 
[2024/02/01 02:09:13] /____/\__/_/_/_/\___/_//_/____/\__/_//_/\__/_//_/ 
[2024/02/01 02:09:13] 
[2024/02/01 02:09:13] LemonBench - A simple Linux Platform Benchmark & Evaluation Utility.
[2024/02/01 02:09:13] (C)iLemonrain. All Rights Reserved. Distribute under MIT License.
[2024/02/01 02:09:13] 
[2024/02/01 02:09:13] Scanning for Runtime Dependency ...
[2024/02/01 02:09:13] Installing Runtime Dependency ...
AlmaLinux 8 - BaseOS                                                     5.3 kB/s | 3.8 kB     00:00    
AlmaLinux 8 - AppStream                                                  6.1 kB/s | 4.1 kB     00:00    
AlmaLinux 8 - Extras                                                     5.5 kB/s | 3.8 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                            11 kB/s | 7.7 kB     00:00    
Metadata cache created.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1669k  100 1669k    0     0  2262k      0 --:--:-- --:--:-- --:--:-- 2259k
main: line 1664: tar: command not found
chmod: cannot access '/tmp/jq': No such file or directory
Last metadata expiration check: 0:00:03 ago on Thu Feb  1 02:09:17 2024.
Package epel-release-8-19.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 0:00:05 ago on Thu Feb  1 02:09:17 2024.
Dependencies resolved.
=========================================================================================================
 Package                            Architecture   Version                       Repository         Size
=========================================================================================================
Installing:
 sysbench                           x86_64         1.0.20-5.el8                  epel              160 k
Installing dependencies:
 ck                                 x86_64         0.6.0-9.el8                   epel               32 k
 libaio                             x86_64         0.3.112-1.el8                 baseos             32 k
 libpq                              x86_64         13.11-1.el8.alma.1            appstream         198 k
 luajit                             x86_64         2.1.0-0.16beta3.el8           epel              359 k
 mariadb-connector-c                x86_64         3.1.11-2.el8_3                appstream         199 k
 mariadb-connector-c-config         noarch         3.1.11-2.el8_3                appstream          14 k

Transaction Summary
=========================================================================================================
Install  7 Packages

Total download size: 995 k
Installed size: 3.1 M
Downloading Packages:
(1/7): libpq-13.11-1.el8.alma.1.x86_64.rpm                               1.6 MB/s | 198 kB     00:00    
(2/7): mariadb-connector-c-3.1.11-2.el8_3.x86_64.rpm                     1.6 MB/s | 199 kB     00:00    
(3/7): libaio-0.3.112-1.el8.x86_64.rpm                                   256 kB/s |  32 kB     00:00    
(4/7): mariadb-connector-c-config-3.1.11-2.el8_3.noarch.rpm              251 kB/s |  14 kB     00:00    
(5/7): ck-0.6.0-9.el8.x86_64.rpm                                         359 kB/s |  32 kB     00:00    
(6/7): sysbench-1.0.20-5.el8.x86_64.rpm                                  1.9 MB/s | 160 kB     00:00    
(7/7): luajit-2.1.0-0.16beta3.el8.x86_64.rpm                             2.5 MB/s | 359 kB     00:00    
---------------------------------------------------------------------------------------------------------
Total                                                                    423 kB/s | 995 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                 1/1 
  Installing       : luajit-2.1.0-0.16beta3.el8.x86_64                                               1/7 
  Installing       : ck-0.6.0-9.el8.x86_64                                                           2/7 
  Installing       : mariadb-connector-c-config-3.1.11-2.el8_3.noarch                                3/7 
  Installing       : mariadb-connector-c-3.1.11-2.el8_3.x86_64                                       4/7 
  Installing       : libpq-13.11-1.el8.alma.1.x86_64                                                 5/7 
  Installing       : libaio-0.3.112-1.el8.x86_64                                                     6/7 
  Installing       : sysbench-1.0.20-5.el8.x86_64                                                    7/7 
  Running scriptlet: sysbench-1.0.20-5.el8.x86_64                                                    7/7 
  Verifying        : libaio-0.3.112-1.el8.x86_64                                                     1/7 
  Verifying        : libpq-13.11-1.el8.alma.1.x86_64                                                 2/7 
  Verifying        : mariadb-connector-c-3.1.11-2.el8_3.x86_64                                       3/7 
  Verifying        : mariadb-connector-c-config-3.1.11-2.el8_3.noarch                                4/7 
  Verifying        : ck-0.6.0-9.el8.x86_64                                                           5/7 
  Verifying        : luajit-2.1.0-0.16beta3.el8.x86_64                                               6/7 
  Verifying        : sysbench-1.0.20-5.el8.x86_64                                                    7/7 

Installed:
  ck-0.6.0-9.el8.x86_64                           libaio-0.3.112-1.el8.x86_64                           
  libpq-13.11-1.el8.alma.1.x86_64                 luajit-2.1.0-0.16beta3.el8.x86_64                     
  mariadb-connector-c-3.1.11-2.el8_3.x86_64       mariadb-connector-c-config-3.1.11-2.el8_3.noarch      
  sysbench-1.0.20-5.el8.x86_64                   

Complete!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2173k  100 2173k    0     0  2886k      0 --:--:-- --:--:-- --:--:-- 2886k
main: line 1704: tar: command not found
chmod: cannot access '/tmp/fio': No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1075k  100 1075k    0     0  1737k      0 --:--:-- --:--:-- --:--:-- 1735k
main: line 1717: tar: command not found
chmod: cannot access '/tmp/speedtest': No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3517k  100 3517k    0     0  4033k      0 --:--:-- --:--:-- --:--:-- 4033k
main: line 1742: tar: command not found
chmod: cannot access '/tmp/nexttrace': No such file or directory
BenchFunc_DepProcess_DepInst(): Dep Failed
[root@perfect-pods-1 ~]# 

双路服务器核心/线程数异常,跑分异常

Environments:Debian 12 on arm / 2*Hi1616 / Taishan 2280(100) / LemonBench v3.0

Expected result:
CPU Specifications: 2 Physical CPUs, 64 Total Cores, 64 Total Threads

Outputs:

-> System Information

CPU Model Name: Cortex-A72
CPU Cache Size: L1: 2.00 MB / L2: 16.00 MB / L3: 64.00 MB
CPU Specifications: 2 Physical CPUs, 32 Total Cores, 32 Total Threads
Virtualization Ready: Yes (Based on unknown)
Virtualization Type: Dedicated
Memory Usage: 947.51 MiB / 31.20 GiB
Swap Usage: 0 KiB / 977.00 MiB
Disk Usage: 2.15 GiB / 914.38 GiB
Boot Disk: /dev/sda2
OS Release: Debian GNU/Linux 12 (bookworm) (aarch64)
Kernel Version: 6.1.0-10-arm64

-> CPU Performance Test (Fast mode, 1-Pass @ 5sec)

1 Thread(s) Test: 2345.24 Scores (1.00x)
32 Thread(s) Test: 74605.76 Scores (31.81x)

BenchFunc_DepProcess_DepInst(): Dep Failed ( centos 7)

curl: (35) Peer reports incompatible or unsupported protocol version.
tar: /tmp/speedtest.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
chmod: cannot access '/tmp/speedtest': No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2929k 100 2929k 0 0 8951k 0 --:--:-- --:--:-- --:--:-- 8932k
BenchFunc_DepProcess_DepInst(): Dep Failed

CentOS 7: BenchFunc_DepProcess_DepInst(): Dep Failed

完整输出

[root@us1 ~]# wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
[2024/01/28 10:21:41] 
[2024/01/28 10:21:41]    __                       ___               __  
[2024/01/28 10:21:41]   / /  ___ __ _  ___  ___  / _ )___ ___  ____/ /  
[2024/01/28 10:21:41]  / /__/ -_)  ' \/ _ \/ _ \/ _  / -_) _ \/ __/ _ \ 
[2024/01/28 10:21:41] /____/\__/_/_/_/\___/_//_/____/\__/_//_/\__/_//_/ 
[2024/01/28 10:21:41] 
[2024/01/28 10:21:41] LemonBench - A simple Linux Platform Benchmark & Evaluation Utility.
[2024/01/28 10:21:41] (C)iLemonrain. All Rights Reserved. Distribute under MIT License.
[2024/01/28 10:21:41] 
[2024/01/28 10:21:41] Scanning for Runtime Dependency ...
[2024/01/28 10:21:41] Installing Runtime Dependency ...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                        |  27 kB  00:00:00     
 * base: mirrors.sonic.net
 * elrepo: elrepo.org
 * epel: irltoolkit.mm.fcix.net
 * extras: mirrors.ocf.berkeley.edu
 * updates: mirror.chpc.utah.edu
base                                                                                                                        | 3.6 kB  00:00:00     
docker-ce-stable                                                                                                            | 3.5 kB  00:00:00     
elrepo                                                                                                                      | 3.0 kB  00:00:00     
extras                                                                                                                      | 2.9 kB  00:00:00     
nodesource                                                                                                                  | 2.5 kB  00:00:00     
packages-microsoft-com-prod                                                                                                 | 1.5 kB  00:00:00     
updates                                                                                                                     | 2.9 kB  00:00:00     
Metadata Cache Created
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.sonic.net
 * elrepo: elrepo.org
 * epel: irltoolkit.mm.fcix.net
 * extras: mirrors.ocf.berkeley.edu
 * updates: mirror.chpc.utah.edu
Package epel-release-7-14.noarch already installed and latest version
Nothing to do
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.sonic.net
 * elrepo: elrepo.org
 * epel: irltoolkit.mm.fcix.net
 * extras: mirrors.ocf.berkeley.edu
 * updates: mirror.chpc.utah.edu
Package sysbench-1.0.17-2.el7.x86_64 already installed and latest version
Nothing to do
BenchFunc_DepProcess_DepInst(): Dep Failed

尝试过 #6 的方法,但没有解决

LemonBench does not work with sh

Hello! I've just discovered your script from a Chinese website. I tried it out, it seems to run fine with bash, but not with plain sh:

william@31:~$ sh LemonBench.sh 
LemonBench.sh: 2808: [[: not found

I've also checked the source using a tool called shellcheck and looked at the code -- it's not difficult to convert it to be POSIX-compatible. So, may I just go ahead and submit a PR?

Thanks!

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.