Init package
Signed-off-by: Lv Ying <lvying6@huawei.com>
This commit is contained in:
parent
47670cff25
commit
07841563a1
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# A-Tune-BPF-Collection
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
A-Tune-BPF-Collection is BPF based tunning tools collection
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
31
README.md
31
README.md
@ -1,23 +1,38 @@
|
|||||||
# A-Tune-BPF-Collection
|
# A-Tune-BPF-Collection
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
A-Tune-BPF-Collection is BPF based tunning tools collection
|
A-Tune-BPF-Collection是BPF工具集,这些BPF程序用以跟踪内核行为模式以实时细粒度地调整内核参数,达到提升系统性能的目标。
|
||||||
|
|
||||||
#### 软件架构
|
#### 软件架构
|
||||||
软件架构说明
|
以`readahead_tune`为例来介绍A-Tune-BPF-Collection中的BPF程序。
|
||||||
|
|
||||||
|
`readahead_tune`包含两部分:
|
||||||
|
|
||||||
|
* BPF program(`readahead_tune.bpf`):加载到内核的BPF program以跟踪ext4/xfs文件系统的文件读操作
|
||||||
|
* BPF control program(`readahead_tune`):读取配置文件,配置BPF program的参数,随即加载BPF program到内核
|
||||||
|
|
||||||
#### 安装教程
|
#### 安装教程
|
||||||
|
|
||||||
1. xxxx
|
通过rpm命令或者yum安装`A-Tune-BPF-Collection` rpm包:
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
```
|
||||||
|
# yum install A-Tune-BPF-Collection
|
||||||
|
or
|
||||||
|
# rpm -ivh A-Tune-BPF-Collection-{version}.x86_64.rpm
|
||||||
|
```
|
||||||
|
|
||||||
#### 使用说明
|
#### 使用说明
|
||||||
|
|
||||||
1. xxxx
|
以`readahead_tune`为例介绍A-Tune-BPF-Collection中的BPF程序程序使用:
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
1. (可选)默认配置文件会安装在`/etc/sysconfig/readahead_tune.conf`,也可以自己新建配置文件,通过`start_readahead_tune`命令`-c|--config`选项指令配置文件路径。若未指定配置文件,则会使用默认安装的配置文件。
|
||||||
|
|
||||||
|
```
|
||||||
|
注意:仅支持通过完整路径名指定配置文件,相对路径会无法识别;配置文件中若存在不合法的选项配置或者配置选项缺失,都会使用该选项的默认配置值。
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 通过`start_readahead_tune`命令启动/加载`readahead_tune.bpf` BPF Program。命令使用方法可以使用`start_readahead_tune -h|--help`帮助命令。
|
||||||
|
3. 通过`stop_readahead_tune`命令停止/卸载`readahead_tune.bpf` BPF Program。
|
||||||
|
|
||||||
#### 参与贡献
|
#### 参与贡献
|
||||||
|
|
||||||
|
|||||||
45
atune_bpf_collection.spec
Normal file
45
atune_bpf_collection.spec
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Name: A-Tune-BPF-Collection
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1
|
||||||
|
License: Mulan PSL v2
|
||||||
|
Summary: BPF program collection to adjust fine-grained kernel mode to get better performance
|
||||||
|
URL: https://gitee.com/openeuler/A-Tune-BPF-Collection
|
||||||
|
Source0: https://gitee.com/openeuler/A-Tune-BPF-Collection/repository/archive/v%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: clang, llvm, libbpf-devel, bpftool, dwarves
|
||||||
|
Requires: libbpf
|
||||||
|
Provides: readahead_tune
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
%description
|
||||||
|
A-Tune BPF Collection contains a set of BPF program which can interact with kernel in real time.
|
||||||
|
It has the following capabilities:
|
||||||
|
readahead_tune: trace file reading characteristics, then ajust file read mode to get maximum I/O efficency
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-v%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -D -p -m 0755 readahead_tune %{buildroot}/%{_sbindir}/readahead_tune
|
||||||
|
install -D -p -m 0644 readahead_tune.bpf.o %{buildroot}/%{_sbindir}/readahead_tune.bpf.o
|
||||||
|
install -D -p -m 0755 start_readahead_tune %{buildroot}/%{_sbindir}/start_readahead_tune
|
||||||
|
install -D -p -m 0755 stop_readahead_tune %{buildroot}/%{_sbindir}/stop_readahead_tune
|
||||||
|
install -D -p -m 0644 readahead_tune.conf %{buildroot}%{_sysconfdir}/sysconfig/readahead_tune.conf
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_sbindir}/readahead_tune
|
||||||
|
%{_sbindir}/readahead_tune.bpf.o
|
||||||
|
%{_sbindir}/start_readahead_tune
|
||||||
|
%{_sbindir}/stop_readahead_tune
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/readahead_tune.conf
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Nov 9 2021 lvying<lvying6@huawei.com> - 1.0.0-1
|
||||||
|
- Type:feature
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: Init A-Tune-BPF-Collection repo and add readahead_tune service
|
||||||
BIN
v1.0.0.tar.gz
Normal file
BIN
v1.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user