Resolve full disk issues on Windows instances

更新时间:
复制 MD 格式

When your Windows instance runs low on disk space, you may experience slow system performance and application failures. This topic explains how to resolve this problem and provides recommendations for routine disk maintenance.

Solutions

The procedure may vary depending on your environment.

Method 1: Free up disk space

You can free up disk space by deleting unnecessary files. Follow these steps:

  1. Identify files that consume significant disk space.

    1. Connect to your Windows instance.

      For more information, see Connect to a Windows instance by using a Remote Desktop client or Windows App.

    2. On the desktop, double-click This PC.

    3. Click the disk that you want to clean up and press Ctrl+E.

    4. In the top navigation bar, select Search > Size to filter files by size.

      Note

      You can also search for files within a custom size range. For example:

      • Enter size:>500MB in the search box to find files larger than 500 MB.

      • Enter size:>100MB <500MB in the search box to find files that are larger than 100 MB but smaller than 500 MB.

  2. Delete unnecessary files.

    We recommend that you use the built-in Windows Disk Cleanup tool to delete files and then empty the Recycle Bin.

    1. In the search box on the taskbar, type Disk Cleanup, select the disk that you want to clean up, and then click OK.

      The system scans the disk, which may take some time.

    2. Select the files that you want to delete and click OK.

Method 2: Resize or add a disk

If you cannot delete files or if cleaning them up does not free up enough space, you can resize the disk or attach a new one. For more information, see Resize a cloud disk (Windows), Create an empty data disk, and Attach a data disk.

Routine disk maintenance

Compress and archive files on a schedule

For regularly generated files, use a compression tool like WinRAR to create a scheduled archiving policy. This helps prevent excessive disk space consumption and improves disk utilization.

  1. If a compression tool is not installed on your system, download and install WinRAR. For the official download link, see WinRAR.

    This example uses the Chinese version of WinRAR. The user interface may vary across different versions.

  2. Find the file that you want to compress, right-click it, and select Add to archive....

  3. Configure the archive's destination and other parameters.

    1. In the Archive name and parameters dialog box, click the Backup tab, select Generate archive name by mask, and do not click OK yet.

    2. On the General tab, click Browse to specify the archive path. Then, click Configuration and select Save current settings to a new profile....

    3. In the Configuration parameters dialog box, enter a Profile name, select Save archive name, Save selected file names, and Create shortcut on Desktop, and then click OK.

    4. Then, in the Archive name and parameters dialog box, click OK.

      This creates a shortcut for the archive profile on the desktop.

  4. Configure a file compression policy.

    1. Navigate to Control Panel > System and Security > Administrative Tools and click Schedule tasks. In the Task Scheduler window, click Create Basic Task....

    2. In the wizard, configure the task parameters.

      In the Start a Program step, for Program/script, browse to and select the desktop shortcut you created.

Periodically uninstall unnecessary applications

Periodically, go to Control Panel > Programs and Features to uninstall applications you no longer use.

Periodically clean up disks

In distributed systems with multiple ECS instances, applications generate many log files. Over time, these logs accumulate and can consume significant disk space. You can use CloudOps Orchestration Service (OOS) for automatic, scheduled batch cleanup of disk files. This prevents performance issues and ensures system stability. For more information, see Periodically clean up disk space.

Monitor disk space usage

You can also use the CloudMonitor console to view metrics and set alert rules for disk usage. When disk usage reaches the threshold, CloudMonitor sends a notification, prompting you to take timely action.

For more information, see View monitoring information of a disk.

Optimize your storage solution

If your disk space is frequently exhausted or your data storage requirements are growing rapidly, consider optimizing your storage solution.

  • If your disk stores a large number of files such as images and videos that do not require high-concurrency I/O, consider using Object Storage Service (OSS). OSS is a cloud storage service that provides massive, secure, low-cost, and highly reliable storage. It automatically scales as your data grows, eliminating the need for manual resizing. You can use ossfs to mount an OSS bucket to an ECS instance. This allows applications to access files in OSS as if they are local files, without modifying your application code. For more information, see ossfs.

  • If your applications require high-concurrency I/O and file sharing, consider using File Storage NAS to store files. NAS provides simple, scalable file storage for ECS instances. It offers a high-performance, high-concurrency shared storage service that automatically scales as your data grows, eliminating the need for manual resizing. For detailed instructions, see Quick Start (Windows).

  • For large-scale log collection and analysis, store logs in Simple Log Service (SLS) to simplify log queries and reduce storage consumption.