Reducing Startup config file size with service compress-config command

The service compress-config is a nice feature from Cisco that mimics the Microsoft NTFS compression. It allows to reduce the size of the startup-file, in some cases to one quarter of the original size.

Configuring the service compress-config command

Configuring the compression feature is easy. Position yourself at the global configuration level and issue the command service compress-config on the Cisco switch:


When you do a write mem, usually the IOS will display a simple message saying that configuration has been saved. However, with service compress-config, this same message becomes the following:

Compressed configuration from … bytes to … bytes[OK]

Here is an example:


One immediate drawback of this command is that write mem and show run take a little much longer to execute than usual. Don’t tell me it’s due to a high resource usage. I tried them on a fresh Catalyst 3650 and they do take a bit of time.

Disabling service compress-config

To disable the compression of the startup-file, simply do a no service compress-config on the global configuration mode.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *