在 VM 未响应后,Azure Ubuntu VM 服务中的未知磁盘读取字节和磁盘操作
Unknown Disk Read Bytes and Disk Operations at Azure Ubuntu VM service after that VM is not responding
每周将近两三次,azure vm 停止响应。当它发生时,磁盘读取字节数急剧增加我不知道为什么。我的应用没有读盘功能(只写日志)。
正如您在图中看到的,Read Bytes 和 Disk Operations 增加了一段时间,导致服务器冻结。我必须重新启动 VM,并且需要将近 15 分钟才能再次可用。
Azure Ubuntu VM Stats
我正在使用 Azure Ubuntu 16.04 VM,大小是标准 B1s(1 个 vcpus,1 GiB 内存)。
我已经检查过这些条件
- 我的应用程序可能存在内存泄漏
- 观察了应用程序的所有源代码是否存在磁盘读取功能(我的应用程序没有任何磁盘准备操作)
- 我已将 ubuntu %60 处的默认虚拟内存大小更改为 %1
- 我正在使用 docker 到 运行 我的应用程序,我在 vm
上只使用 docker 图像的 1 个实例
- 我删除了所有虚拟机并重新创建了它(包括所有资源,即 disk/network 等)
我想知道为什么会这样,我该如何调查导致此问题的原因。当它发生时,我在 ubuntu 没有看到任何可疑的 运行ning 进程。
此问题已由 Azure 技术支持工程师解决(感谢Micah_MSFT)
Azure VM 似乎内存不足。当它发生时,VM 表现不稳定,因此磁盘操作迅速增加并且 VM 冻结(他们正在调查问题的详细信息并报告给 Linux 技术人员)。
As clarified by Azure Technical Support Engineer, There is a feature
named Swap Space which helps the saver to reserve storage space as
processing memory.
配置如下
- 打开位于/etc/waagent.conf下的文件,找到这些变量并进行相应的修改:
# Format if unformatted. If 'n', resource disk will not be mounted.
ResourceDisk.Format=n /// change this parameter to "y"
# Create and use swapfile on resource disk.
ResourceDisk.EnableSwap=n /// change this parameter to "y"
# Size of the swapfile.
ResourceDisk.SwapSizeMB=0 /// change this parameter to "1024"
- 重新启动服务以应用更改
sudo systemctl restart walinuxagent.service
That's it
在我看来,由于内存不足限制而不必要地增加磁盘使用量会导致 Azure VM 性能下降。
每周将近两三次,azure vm 停止响应。当它发生时,磁盘读取字节数急剧增加我不知道为什么。我的应用没有读盘功能(只写日志)。 正如您在图中看到的,Read Bytes 和 Disk Operations 增加了一段时间,导致服务器冻结。我必须重新启动 VM,并且需要将近 15 分钟才能再次可用。
Azure Ubuntu VM Stats
我正在使用 Azure Ubuntu 16.04 VM,大小是标准 B1s(1 个 vcpus,1 GiB 内存)。
我已经检查过这些条件
- 我的应用程序可能存在内存泄漏
- 观察了应用程序的所有源代码是否存在磁盘读取功能(我的应用程序没有任何磁盘准备操作)
- 我已将 ubuntu %60 处的默认虚拟内存大小更改为 %1
- 我正在使用 docker 到 运行 我的应用程序,我在 vm 上只使用 docker 图像的 1 个实例
- 我删除了所有虚拟机并重新创建了它(包括所有资源,即 disk/network 等)
我想知道为什么会这样,我该如何调查导致此问题的原因。当它发生时,我在 ubuntu 没有看到任何可疑的 运行ning 进程。
此问题已由 Azure 技术支持工程师解决(感谢Micah_MSFT)
Azure VM 似乎内存不足。当它发生时,VM 表现不稳定,因此磁盘操作迅速增加并且 VM 冻结(他们正在调查问题的详细信息并报告给 Linux 技术人员)。
As clarified by Azure Technical Support Engineer, There is a feature named Swap Space which helps the saver to reserve storage space as processing memory.
配置如下
- 打开位于/etc/waagent.conf下的文件,找到这些变量并进行相应的修改:
# Format if unformatted. If 'n', resource disk will not be mounted.
ResourceDisk.Format=n /// change this parameter to "y"
# Create and use swapfile on resource disk.
ResourceDisk.EnableSwap=n /// change this parameter to "y"
# Size of the swapfile.
ResourceDisk.SwapSizeMB=0 /// change this parameter to "1024"
- 重新启动服务以应用更改
sudo systemctl restart walinuxagent.service
That's it
在我看来,由于内存不足限制而不必要地增加磁盘使用量会导致 Azure VM 性能下降。