IIS gzip Cache file One-click method of Bulk deletion (BAT) _win server

Source: Internet
Author: User
Tags cpu usage high cpu usage

In the front we introduced the way IIS opens gzip, but you know that when you turn on GIZP there will be a lot of caching, if not cleaned up for a long time. That folder is going to be big. Cause the Web card to open, all we have to do regularly. Clean. I went to the server today to see the directory has 6 g files. Open folder all cards. All we use is to use the cmd command to delete.

How do I delete the gzip cache?

Copy Code code as follows:

del/f/s/q c:\1

That's the order. It means. Delete all files in the 1 directory in C disk, and remember to change the directory in the top command to the gzip path you want to delete.

As shown in figure:

However, the test is not very good, often will be card off. For more than 6 G folder, Del directly out, can not delete, now more objective solution, temporarily create a new directory as the gzip cache directory, do not recommend to the C disk, preferably another hard disk partition on a new folder ( Note Permissions can be added to the Everyone read and write, or IIS will not run or cause the Web site to be inaccessible, and then through the RD command to delete the original directory.

A specific order.

RD/S/q c:\gziptmp

More useful, but will lead to high CPU usage, so for the cache file too much situation, our previous machine is because of too many cache files, server restart will cause the Web address can not be accessed, cancel gzip or will gzip to change directories to access. So think of the above method or limit the size of the gzip cache directory, I set to 1024, basically there will be no problem.

For users who use CDN, it is not recommended to open gzip, if you have enough bandwidth, save CPU and bandwidth you need to weigh it. My server bandwidth is enough so it does not open, access faster, anyway, there is a CDN to resist. Even if you open the GZIP,CDN will not be able to open. It's better to give it to CDN. It is said not to open also can save the client's CPU. Visiting your site is quicker. Why not. Personal point of view everyone has a better solution please leave a message, thank you every day 6G more cache file Server card. Never dare to reboot.

The following are additional users:

Server and VPS on the C disk is full of different situations, mainly to find space to occupy the files and folders, to confirm whether the normal files, and to do the corresponding clean-up, here mainly explain 2 kinds of common situation.

A. When the IIS Web site starts the gzip feature, the pages that are accessed produce a large number of files in C, which can cause the C disk to fill up,

The solution is:

1. Manually clean up these cached files (%windir%\iis temporary compressed files).

2, set the size of the cache (right-click Web Site Properties----Service----The maximum capacity of the temporary directory---limited to (megabytes).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.