当前位置: 首页 > news >正文

NFS性能瓶颈分析

前言
atop – run it with -d option or press d to toggle the disk stats view.
iostat – try it with the -xm 2 options for extended statistics, in megabytes, and in two-second intervals.
iotop – top-like I/O monitor. Try it with the -oPa options to show the accumulated I/O of active processes only.
ps – use auxf, then under the “STAT” column “D” usually indicates disk iowait.
strace – view the actual operations issued by a process. Read the strace man page.
lsof – after you’ve identified the process responsible, use -p [PID] to find the specific files.
nfsiostat 是nfs-utils的一部分,参考了iostat,主要展示本机作为NFS客户端周期的统计数据
nfsiostat
nfsiostat是nfs-utils的一部分,参考了iostat,主要展示本机作为NFS客户端周期的统计数据

命令格式

nfsiostat [[<interval>] [<count>]] [<options>][<mount_point>]
官方命令文档

- op/s 
This is the number of operations per second.
- rpc bklog
This is the length of the backlog queue.
- kB/s
This is the number of kB written/read per second.
- kB/op
This is the number of kB written/read per each operation.
- retrans
This is the number of retransmissions.
- avg RTT (ms)
This is the duration from the time that client's kernel sends the RPC request until the time it receives the reply.
- avg exe (ms)
This is the duration from the time that NFS client does the RPC request to its kernel until the RPC request is completed, this includes the RTT time above.
- avg queue (ms)
This is the duration from the time the NFS client created the RPC request task to the time the request is transmitted.
- errors
This is the number of operations that completed with an error status (status < 0).  This count is only available on kernels with RPC iostats version 1.1 or above.
kB/op:每次操作的平均包大小,可以作为mount里的参数rsize,wsize参考 

avg RTT (ms):客户端从kernel发出RPC请求 到 接收到回复的时间

avg exex(ms): 包含了 avg RTT, 是客户端发从请求到请求结束的时间

Avg RTT= network latency + NFS storage latency.


mountstats
官方文档

iostat
官方文档

iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V
       ] [ -x ] [ -y ] [ -z ] [ --dec={ 0 | 1 | 2 } ] [ { -f | +f }
       directory ] [ -j { ID | LABEL | PATH | UUID | ... } ] [ -o JSON ]
       [ [ -H ] -g group_name ] [ --human ] [ --pretty ] [ -p [
       device[,...] | ALL ] ] [ device [...] | ALL ] [ interval [ count
       ] ]
options 操作项,interval指定统计时间间隔,count总共输出次数222222 

#iostat 会每2秒更新一次,一共打印5次信息, -x 的选项是打印出扩展信息
iostat -x 2 5


 avg-cpu    %user    %nice    %system    %iowait    %steal    %idle
78.26    0.00    9.84    4.13    0.00    7.77
user:  user 级别的cpu使用占比
nice:
system:  kernel 解绑cpu使用占比
iowait:  等待io的占比
steal: Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor
Device    r/s    rkB/s    rrqm/s    %rrqm    r_await    rareq-sz    w/s    wkB/s    wrqm/s    %wrqm    w_await    wareq-sz    d/s    dkB/s    drqm/s    %drqm    d_await    dareq-sz    aqu-sz    %util
nvme0n1    14426.57    1601785.67    0    0    0.27    111.03    0    0    0    5.88    2.56    2.25    0    0    0    0    0    0    0    95.86
 r/s: request/ per second
rkB/s, rMB/s:  每秒读的字节数
rrqm/s:  读请求每秒加入磁盘队列的数量

%rrqm:通上,单位百分比

r_await: 单位milliseconds,完成读请求平均时间,包括队列中的时间

rareq-sz: 平均每次请求的大小,单位KB

r:read 读,w:write 写,d:discard 抛弃, w和d的参数参考r,不细写了

aqu-sz:磁盘平均队列长度

util:bandwidth utilization for the device。Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% for devices serving requests serially. But for devices serving requests in parallel, such as RAID arrays and modern SSDs, this number does not reflect their performance limits.

util:在统计时间内所有处理IO时间,除以总共统计时间。
例如,如果统计间隔1秒,该设备有0.8秒在处理IO,而0.2秒闲置,那么该设备的%util = 0.8/1 = 80%,所以该参数暗示了设备的繁忙程度。
一般地,如果该参数是100%表示设备已经接近满负荷运行了
(当然如果是多磁盘,即使%util是100%,因为磁盘的并发能力,所以磁盘使用未必就到了瓶颈)

nfstat 
nfsstat(8) - Linux manual page

Ubuntu Manpage: nfsstat - list NFS statistics

       /proc/net/rpc/nfsd
              procfs-based interface to kernel NFS server statistics.

       /proc/net/rpc/nfs
              procfs-based interface to kernel NFS client statistics.

       /proc/mounts
              procfs-based interface to the mounted filesystems.
# server信息
nfsstat -s
 
# clinet 信息
nfsstat -c
nfsd
Ubuntu Manpage: nfsd - special filesystem for controlling Linux NFS server

rpc.nfsd 
Ubuntu Manpage: rpc.nfsd - NFS server process

相关文章:

NFS性能瓶颈分析

前言 atop – run it with -d option or press d to toggle the disk stats view. iostat – try it with the -xm 2 options for extended statistics, in megabytes, and in two-second intervals. iotop – top-like I/O monitor. Try it with the -oPa options to show the…...

Java中配置RabbitMQ基本步骤

在Java中配置RabbitMQ&#xff0c;需要遵循以下步骤&#xff1a; 1.添加依赖 在项目的pom.xml文件中添加RabbitMQ的Java客户端依赖&#xff1a; <dependency><groupId>com.rabbitmq</groupId><artifactId>amqp-client</artifactId><versio…...

Ingress典型配置

Ingress 是 Kubernetes 中用于管理 HTTP 和 HTTPS 路由的资源。以下是一个典型的 Ingress 配置示例&#xff0c;用于将流量引导到两个不同的服务&#xff1a; apiVersion: networking.k8s.io/v1 kind: Ingress metadata:name: example-ingress spec:rules:- host: example.com…...

webpack中常见的Loader解决了什么问题?

一、是什么 loader 用于对模块的"源代码"进行转换&#xff0c;在 import 或"加载"模块时预处理文件 webpack做的事情&#xff0c;仅仅是分析出各种模块的依赖关系&#xff0c;然后形成资源列表&#xff0c;最终打包生成到指定的文件中。如下图所示&#…...

阿里7年经验之谈 —— 如何实现前端项目的自动化测试?

这其实就是我们常说的“UI自动化测试”&#xff0c;针对这个问题&#xff0c;我先告知答题思路如下&#xff1a; 1、什么是UI自动化&#xff1f;有什么优势&#xff1f; 2、UI自动化实践中会遇到什么难题&#xff1f; 3、如何解决难题&#xff0c;将UI落实到实践中&#xff1f;…...

动态开辟内存空间函数

文章目录 malloc函数calloc函数malloc函数和calloc函数的不同free函数realloc函数 malloc函数 参数是要开辟内存空间的大小 开辟成功则返回值为开辟空间的首地址&#xff0c;若开辟失败则返回一个空指针NULL calloc函数 第一个参数为开辟空间的元素个数&#xff0c;第二个参数…...

nodejs+vue备忘记账系统-计算机毕业设计

本文首先介绍了备忘记账系统管理技术的发展背景与发展现状&#xff0c;然后遵循软件常规开发流程&#xff0c;首先针对系统选取适用的语言和开发平台&#xff0c;目 录 摘 要 I ABSTRACT II 目 录 II 第1章 绪论 1 1.1背景及意义 1 1.2 国内外研究概况 1 1.3 研究的内容 1 第2章…...

百度Comate代码助手SaaS版本:智慧编程,引领新潮

引言 在当今数字化时代&#xff0c;软件开发已成为企业成功的关键因素之一。为了应对市场需求的不断变化&#xff0c;企业需要更高效、更灵活的开发工具。百度Comate代码助手的SaaS版本的正式上线&#xff0c;为广大企业和开发者提供了一种全新的编码方式&#xff0c;帮助他们…...

数据与视图的完美契合:Vue响应式的交织魅力

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…...

Centos8 降低gcc版本至gcc-7.3

1 首先卸载系统中的gcc sudo yum remove gcc 2 重新安装gcc-7.3 sudo dnf group install “Development Tools” 然后再次卸载gcc sudo yum remove gcc 然后发现centos-release-scl-rh已经安装了 sudo yum install centos-release-scl-rh yum -y install devtoolset-7-gcc dev…...

Qt之设置QLineEdit只能输入浮点数

Qt提供了QDoubleValidator来进行浮点数校验,但是它同样存在限定范围无效的问题,详见:Qt之彻底解决QSpinBox限定范围无效的问题 因此我们要子类化QDoubleValidator,并重写其中的validate方法,最后调用QLineEdit的setValidator方法,并将这个子类当做参数传入。 QHDoubleVa…...

Spark项目实战-卡口流量统计

一、卡口介绍 卡口摄像头正对车道安装&#xff0c;拍摄正面照片。 功能&#xff1a;抓拍正面特征 这种摄像头多安装在国道、省道、高速公路的路段上、或者城区和郊区交接的主要路口&#xff0c;用来抓拍超速、进出城区车辆等行为。它进行的是车辆正面抓拍&#xff0c;可以清晰…...

kubernetesr进阶--Secret概述

概述 Kubernetes Secret 对象可以用来储存敏感信息&#xff0c;例如&#xff1a;密码、OAuth token、ssh 密钥等。如果不使用 Secret&#xff0c;此类信息可能被放置在 Pod 定义中或者容器镜像中。将此类敏感信息存储到 Secret 中&#xff0c;可以更好地&#xff1a; 控制其使…...

在 Python 中使用 Pillow 进行图像处理【2/4】

第二部分 一、说明 该文是《在 Python 中使用 Pillow 进行图像处理》的第二部分&#xff0c;主要介绍pil库进行一般性处理&#xff1a;如&#xff1a;图像卷积、钝化、锐化、阈值分割。 二、在 Python 中使用 Pillow 进行图像处理 您已经学习了如何裁剪和旋转图像、调整图像大…...

XTU-OJ 1171-coins

题目描述 一个均质硬币抛n次&#xff0c;求不存在连续2次为正面的方案数。 输入 每行一个正整数n&#xff0c;n≤40。如果n为0&#xff0c;表示输入结束&#xff0c;不需要处理。 输出 每行输出一个结果&#xff0c;为一个整数。 样例输入 1 2 3 0样例输出 2 3 5 解题思路&…...

如何使用 JMeter 进行 HTTPS 请求测试?

本文将介绍如何使用 JMeter 测试 HTTPS 请求&#xff0c;并提供相关的技巧和注意事项。 在进行性能测试时&#xff0c;很多网站都采用了 HTTPS 协议。当我们测试 HTTPS 请求&#xff0c;如果服务端开启了双向认证&#xff0c;则需要客户端发送请求时带上证书。本文介绍如何在 …...

KNN-水仙花的分类

题目&#xff1a; 思路&#xff1a; 1、处理数据集&#xff0c;这里用的是题目已知的数据集&#xff0c;所以说需要提前将写好的数据放到excel表格里&#xff0c;再进行读取。 2、将数据集划分为训练集和测试集 3、定义K-NN模型。 4、训练模型 5、预测模型 6、计算分类精…...

Kotlin 如何确定协程是否启动

在Kotlin中&#xff0c;你可以确定协程是否已启动并正在运行&#xff0c;可以使用Job接口来管理协程&#xff0c;并使用一些函数来检查协程的状态。以下是一些常见的方法&#xff1a; 1.launch 函数返回一个 Job 对象&#xff0c;可以使用这个对象来确定协程的状态。例如&…...

【Spring Boot】Spring Boot集成RabbitMQ

一、发送和接收消息 Spring Boot提供了`spring-boot-starter-amqp`组件,只需要简单地配置即可与Spring Boot无缝集成。下面通过示例演示集成RabbitMQ实现消息的接收和发送。 步骤01 配置pom包。 创建Spring Boot项目并在pom.xml文件中添加spring-bootstarter-amqp等相关组件…...

Hadoop部署过程中问题总结

Hadoop伪分布式集群部署问题总结 一、HDFS初始化失败 初始化失败&#xff0c;HDFS初始化操作如下&#xff1a; hdfs namenode -format然后我运行后报错&#xff1a;error parsing conf core-site.xml 出现这个信息就说明core-site.xml配置文件出错了&#xff0c;用vim命令可…...

谷歌浏览器插件

项目中有时候会用到插件 sync-cookie-extension1.0.0&#xff1a;开发环境同步测试 cookie 至 localhost&#xff0c;便于本地请求服务携带 cookie 参考地址&#xff1a;https://juejin.cn/post/7139354571712757767 里面有源码下载下来&#xff0c;加在到扩展即可使用FeHelp…...

Leetcode 3576. Transform Array to All Equal Elements

Leetcode 3576. Transform Array to All Equal Elements 1. 解题思路2. 代码实现 题目链接&#xff1a;3576. Transform Array to All Equal Elements 1. 解题思路 这一题思路上就是分别考察一下是否能将其转化为全1或者全-1数组即可。 至于每一种情况是否可以达到&#xf…...

日语学习-日语知识点小记-构建基础-JLPT-N4阶段(33):にする

日语学习-日语知识点小记-构建基础-JLPT-N4阶段(33):にする 1、前言(1)情况说明(2)工程师的信仰2、知识点(1) にする1,接续:名词+にする2,接续:疑问词+にする3,(A)は(B)にする。(2)復習:(1)复习句子(2)ために & ように(3)そう(4)にする3、…...

大数据零基础学习day1之环境准备和大数据初步理解

学习大数据会使用到多台Linux服务器。 一、环境准备 1、VMware 基于VMware构建Linux虚拟机 是大数据从业者或者IT从业者的必备技能之一也是成本低廉的方案 所以VMware虚拟机方案是必须要学习的。 &#xff08;1&#xff09;设置网关 打开VMware虚拟机&#xff0c;点击编辑…...

Linux简单的操作

ls ls 查看当前目录 ll 查看详细内容 ls -a 查看所有的内容 ls --help 查看方法文档 pwd pwd 查看当前路径 cd cd 转路径 cd .. 转上一级路径 cd 名 转换路径 …...

Auto-Coder使用GPT-4o完成:在用TabPFN这个模型构建一个预测未来3天涨跌的分类任务

通过akshare库&#xff0c;获取股票数据&#xff0c;并生成TabPFN这个模型 可以识别、处理的格式&#xff0c;写一个完整的预处理示例&#xff0c;并构建一个预测未来 3 天股价涨跌的分类任务 用TabPFN这个模型构建一个预测未来 3 天股价涨跌的分类任务&#xff0c;进行预测并输…...

Qwen3-Embedding-0.6B深度解析:多语言语义检索的轻量级利器

第一章 引言&#xff1a;语义表示的新时代挑战与Qwen3的破局之路 1.1 文本嵌入的核心价值与技术演进 在人工智能领域&#xff0c;文本嵌入技术如同连接自然语言与机器理解的“神经突触”——它将人类语言转化为计算机可计算的语义向量&#xff0c;支撑着搜索引擎、推荐系统、…...

2025 后端自学UNIAPP【项目实战:旅游项目】6、我的收藏页面

代码框架视图 1、先添加一个获取收藏景点的列表请求 【在文件my_api.js文件中添加】 // 引入公共的请求封装 import http from ./my_http.js// 登录接口&#xff08;适配服务端返回 Token&#xff09; export const login async (code, avatar) > {const res await http…...

从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(九)

设备树移植 和uboot设备树修改的内容同步到kernel将设备树stm32mp157d-stm32mp157daa1-mx.dts复制到内核源码目录下 源码修改及编译 修改arch/arm/boot/dts/st/Makefile&#xff0c;新增设备树编译 stm32mp157f-ev1-m4-examples.dtb \stm32mp157d-stm32mp157daa1-mx.dtb修改…...

Linux-07 ubuntu 的 chrome 启动不了

文章目录 问题原因解决步骤一、卸载旧版chrome二、重新安装chorme三、启动不了&#xff0c;报错如下四、启动不了&#xff0c;解决如下 总结 问题原因 在应用中可以看到chrome&#xff0c;但是打不开(说明&#xff1a;原来的ubuntu系统出问题了&#xff0c;这个是备用的硬盘&a…...