Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows Server 2003 內建 Empty.exe 釋放記憶體,免裝第三方工具

編輯:Windows 2003 教學

Windows Server 2003 系統資料夾內建 Empty.exe,可針對特定程序釋放工作集,不像第三方記憶體優化工具會強制整理全系統導致硬碟狂轉。使用語法簡單,適合伺服器長期運行時定期釋放殘留記憶體。

工具位置與語法

路徑:%SystemRoot%\System32\Empty.exe (或支援工具安裝目錄)

Empty.exe            # 依程序 ID 釋放
Empty.exe <程序名稱>      # 依映像名稱釋放 (如 Empty.exe notepad.exe)

操作範例

  1. 工作管理員 →「程序」頁 → 檢視 PID(檢視 → 選擇欄位 → 勾選 PID)。
  2. 假設 w3wp.exe (IIS 工作者進程) PID 1234 佔用大量記憶體:
    CMD 執行 Empty.exe 1234。
  3. 或直接 Empty.exe w3wp.exe 釋放所有同名進程工作集。

Empty.exe 使用示意

CMD 執行 Empty.exe

執行結果

特性比較

特性Empty.exe第三方記憶體優化器
釋放範圍單一程序工作集全系統強制 Trim
硬碟 I/O 衝擊極低高 (大量分頁寫入)
適用版本Windows Server 2003 僅限跨版本
需安裝否 (內建/支援工具)是

適用場景

  • IIS/資料庫/應用伺服器長期運行,少數進程記憶體遞增但不洩漏,需定期釋放工作集。
  • 排程工作:schtasks /create /tn "ReleaseMem" /tr "Empty.exe w3wp.exe" /sc hourly。

⚠ 限制

  • **僅限 Windows Server 2003**,Windows 2000/XP/2008 以上版本無此工具 (新版核心記憶體管理機制不同)。
  • 無法解決真正的記憶體洩漏,僅緩解症狀,根治需開發商修補程式。
Copyright © Windows教程網 All Rights Reserved