Saturday, July 30, 2016

Java Cache Sizes are piggy. Whittle them down to size.

How-to article:  Recommend adjusting Java's cache size.

The default cache setting on your Windows Java install is obscenely large.

You can lower the default value by 95% (with no ill effects).  This will save disk, make backups faster, and reduces your java footprint for viruses.


1.  In the Windows Control Panel, double-click "Java 32-bit"
2.  Click "Settings"

Click for larger view
3. Move the disk space slider from the default, usually around 32G, down to any setting near 500MB to 1000MB.  This is more than enough space for normal web-browsing.  The actual size is unimportant.

With a smaller cache, older files auto-purge, as space requires.  If the files are later needed they automatically re-download.  I have been running these settings for years, with no ill-effects.

If you are using Google Docs or Microsoft Office 365, you might consider 2 or 3Gig (2000 - 3000MB) -- allowing for particularly large programs.  At the other end of the spectrum, do not go too low or your browser may spend too much time downloading.

4.  Cleanup old files

In the same dialog, click "Delete Files" 

I tend to leave [ ] Installed Applications and Applets unchecked, but these can be easily cleared, if desired.

(this is deleting cache files.  If the files are needed by some other page, it will re-download automatically).

Especially when spinning a hard-disk drive image, I often clean up this cache, along with my browser cache.  This often saves 'jiga-bytes' of disk, making the backup smaller and faster.

Regardless, a smaller cache size reduces bloat -- especially considering that some large percentage of the programs that live in cache will never be needed again because you may never visit that website a second time. 

An added bonus: If the machine you are working on happened to have picked up a virus, this is one of the first places I delete when cleaning up.  Keeping the cache smaller, gives viruses less places to hide.

Related article:
Java Control Panel Icon "Application not found"

No comments:

Post a Comment

Comments are moderated and published upon review.