sidebar_label | sidebar_position | slug |
---|---|---|
Operations Profiling |
3 |
/operations_profiling |
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:
For now there are 2 modes of profiling: real time and replay.
By executing the following command you can watch real time operations under the mount point:
$ juicefs profile MOUNTPOINT
Tip: The result is sorted in a descending order by total time.
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
Tip 1: The replay could be paused anytime by Enter/Return, and continued by pressing it again.
Tip 2: Setting
--interval 0
will replay the whole log file as fast as possible, and show the result as if it was within one interval.
Sometimes we are only interested in a certain user or process, then we can filter others out by specifying IDs, e.g:
$ juicefs profile /tmp/jfs-oplog --uid 12345
For more information, please run juicefs profile -h
.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。