1 Star 0 Fork 38

zhangweijie / JuiceFS

forked from Juicedata / JuiceFS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
operations_profiling.md 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
Sandy Xu 提交于 2021-04-27 09:24 . add docs for juicefs profile (#350)

Operations Profiling

Introduction

JuiceFS has a special virtual file named .accesslog to track every operation occurred within its client. This file may generate thousands of log entries per second when under pressure, making it hard to find out what is actually going on at a certain time. Thus, we made a simple tool called juicefs profile to show an overview of recently completed operations. The basic idea is to aggregate all logs in the past interval and display statistics periodically, like:

juicefs-profiling

Profiling Modes

For now there are 2 modes of profiling: real time and replay.

Real Time Mode

By executing the following command you can watch real time operations under the mount point:

$ juicefs profile MOUNTPOINT

The result is sorted in a descending order by number.

Replay Mode

Running the profile command on an existing log file enables the replay mode:

$ juicefs profile LOGFILE

When debugging or analyzing perfomance issues, it is usually more practical to record access log first and then replay it(multiple times). For example:

$ cat /jfs/.accesslog > /tmp/jfs-oplog
# later
$ juicefs profile /tmp/jfs-oplog

The replay could be paused anytime by enter/return, and continues by pressing it again.

Filter

Sometimes we are only interested in a certain user or process, then we can filter others out by specifying its IDs; e.g:

$ juicefs profile /tmp/jfs-oplog --uid 12345

For more information, please run juicefs profile -h.

1
https://gitee.com/zhangweijie001/JuiceFS.git
git@gitee.com:zhangweijie001/JuiceFS.git
zhangweijie001
JuiceFS
JuiceFS
main

搜索帮助