It is possible to defragment Kaspersky security files by tweaking settings. Users may find they are unable to defragment Kaspersky files using a utility like Defraggler. Kaspersky consists of dozens of files (including large ones of 150MB+) which can become highly fragmented over time as the product is updated daily.
Defraggler is our ‘go to’ defragmenter tool (the integrated Windows defragmenter tool is very basic and doesn’t do as good a job). However, it is unable to defragment the files of our preferred security solution, Kaspersky IS 2013 – and we expect this issue applies equally to other Kaspersky products such as Antivirus and Pure too.
Defragmenting rearranges the scattered fragments of a file to occupy storage locations next to each other, reducing the time it takes to read the whole file. However, Kaspersky includes a Self-Defense setting which blocks outside attempts to modify its files, therefore preventing defrag utilities from moving them around.
This setting is great for security as it prevents malware from deleting or modifying Kaspersky – but it also prevents defragmentation.
How To Defragment Kaspersky Security Files – The solution is to temporarily turn off some protection so that Kaspersky files can then be defragmented fully. There are 2 simple ways to do this:
1. Via Kaspersky Settings (examples given are for KIS 2013)
- For best security, disable your internet (or LAN network) connection first.
- Right click the Kaspersky icon in the system tray and select ‘Settings’ to open the Settings window.
- Click the Shield icon to enter the Protection Center panel.
- Click the ‘General Settings’ tab and then UN-tick the ‘Enable protection’ setting as shown below:
- Click ‘Apply’ – a warning message appears that Protection is now disabled
- Click the Box icon to enter the Advanced Settings panel
- Click the ‘Self-Defense’ tab and then UN-tick the ‘Enable Self-Defense’ setting as shown below:
- Click ‘Apply’ – a warning message appears that Self-Defense is now disabled.
Now run Defraggler and it should be able to defragment all of Kaspersky’s files. After defragmentation is complete, repeat the steps but this time Tick the boxes to restore Protection and Self-defense – then enable your internet (or LAN) connection again.
2. Via Safe Mode
- Start up in standard Safe Mode i.e. without Networking (to ensure that your internet (or LAN network) is disabled.
- Kaspersky Protection and Self-Defense are not enabled in Safe Mode – so you can just run Defraggler and it should defragment Kaspersky files without problems.
- After defragmentation is complete, restart the computer into normal Windows.
Technical Notes – To defragment Kaspersky security files you actually only need to disable Self-Defense. However, there is a good reason for disabling Protection as well – given in a Kaspersky troubleshooting tip: “Defragmentation programs may change internal file attributes during the work and monitor-programs (including anti-virus programs) start scanning them for changes” – this can result in freezes or delays.
Kaspersky therefore recommend that you switch off antivirus monitoring (i.e. Protection) during operations such as defragmenting.
Alternative – we have seen suggestions in forums that Defraggler could be added as an exclusion in Kaspersky’s Trusted Application list – by setting the ‘Do not monitor application activity’ option. However, this is harder to do and we don’t recommend it because it would permanently exclude Defraggler from Proactive Defense monitoring by Kaspersky of any activity, suspicious or otherwise, that it might ever perform. Granting such privileges to a third party program is just not good security.
It is quite easy to bypass the restrictions and defragment Kaspersky security files. Whilst this is unlikely to lead to a noticeable performance improvement, it does give a feeling of satisfaction to see that there are no longer any files that are fragmented.