Over the years many Java developers have asked, "How much memory
does a Java object consume?" In this Java Tip,
Vladimir Roubtsov explains problems with previous solutions. In
addition, based on his experience exploring memory usage, he offers
a few tips on working around some Java inefficiencies.
Twice today that question was put to me. I thought I’d take a moment and answer it not just for the two individuals who asked, but for anyone who might be wondering. Below is my recommendation…
Earth allows you to find files across a large network of machines and track disk usage in real time. It consists of a daemon that indexes filesystems in real time and reports all the changes back to a central database. This can then be queried through a simple, yet powerful, web interface. Think of it like Spotlight or Beagle but operating system independent with a central database for multiple machines with a web application that allows novel ways of exploring your data.
Autojar dient dazu, jar-Archive minimaler Größe aus unterschiedlichen Qellen (eigenen Klassen, Verzeichnissen, Archiven) zu erzeugen. Ausgehend von einer oder mehreren Klassen wird der Bytecode rekursiv nach weiteren benutzten Klassen durchsucht; diese werden ggf. aus ihrem Archiv extrahiert und in die Ausgabedatei übernommen. Das resultierende Archiv enthält alle tatsächlich benutzten Klassen, und nur diese. Somit lassen sich z.B. Größe und Ladezeit von Applets klein halten oder Applikationen unabhängig von installierten Bibliotheken machen.
S. Ajitha, T. Kumar, D. Geetha, and K. Kanth. 2010 International Conference on Industrial and Information Systems (ICIIS), page 372--376. IEEE, (August 2010)