All Products
Search
Document Center

Elastic Compute Service:Excessive disk space occupied by temporary files in Windows

Last Updated:Mar 31, 2022

Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.

Problem description

For Windows-based instances, the disk space of the C drive is decreasing.

Cause

The C drive keeps decreasing sometimes because the following files occupy too many disk space:

Tip: you can use tools such as WinDirStat or SpaceSniffer to analyze the disk directory size and confirm the cause of the problem.

  • There are many Log files and Cab files whose names start with C:\\ Windows \logs_cbs in the system disk directory. The CbsPersistent_20151211070234 file whose modified time is 2015/12/9 exists in c:\\ Windows \\_dashboards. This file is a log file that is recorded when the Windows patch was installed when the image was created.
  • c:\windows\temp disk directory constantly generate new cab_XXXX_X file takes up a lot of disk space. C:\\ Windows \ temp contains a cab_XXXX_X file modified on 2015/12/11. This file is a temporary file generated when the file is packaged into a CBS file in Windows.

If the operating system created based on the image does not have sufficient memory and no virtual memory is configured, the image may fail to be packaged due to a lack of virtual memory. For more information, see how to solve the problem of insufficient virtual memory in Windows.

Solution

Create a snapshot of the system disk and data disk to avoid data loss.

  • For more information about how to delete unnecessary temporary files, see official Microsoft documentation.
  • Log on to the instance and delete the files manually.

References

When a Windows-based ECS instance is created by default, the size of the system disk is 40 GB. You can specify a larger space for the system disk at the time of purchase, or expand the system disk later.

Application scope

  • ECS