Wednesday, May 21, 2008

Garbage collection in java

Global collections

An example of the output produced when a global collection is triggered is:

"gc type="global" id="6" totalid="6" intervalms="383.226"
compaction movecount="139926" movebytes="9478888"
refs_cleared soft="0" weak="0" phantom="0"
finalization objectsqueued="0"
timesms mark="33.391" sweep="1.760" compact="65.958" total="101.149"
tenured freebytes="1784720" totalbytes="11337472" percent="15"
gc"


Indicates that a garbage collection was triggered on the heap. Type="global" indicates that this was a global collection (mark, sweep, possibly compact). The id attribute gives the occurrence number of this global collection. The totalid indicates the total number of garbage collections (of all types) that have taken place. Currently this is the sum of the number of global collections and the number of scavenger collections. intervalms gives the number of milliseconds since the previous global collection.

Shows the number of objects that were moved during compaction, and the total number of bytes these objects represented. This line appears only if compaction occurred during the collection.

Provides information relating to the number of Java reference objects that were cleared during the collection. In this example, no references were cleared.

Provides information detailing the number of objects containing finalizers that were enqueued for VM finalization during the collection. Note that this is not equal to the number of finalizers that were run during the collection, because finalizers are scheduled by the VM.

Provides information detailing, respectively, times taken for each of the mark, sweep, and compact phases, as well as the total time taken. When compaction was not triggered, the number returned is zero. Note that if the VM being run is not compiled with compaction support, the compact field will not be displayed.

Indicates the status of the tenured area following the collection. If running in generational mode, there will also be a line output, showing the status of the active nursery area too.

ALSO READ
Java collection performance - Chart view
Java development 2.0: Ultra-lightweight Java web services with Gretty
An actor framework for Java concurrency
The Clean Coder



AddThis Social Bookmark Button

Friday, May 09, 2008

Web Hosting for Startups

Looking around for some good resources online , for a small startup to host their dreams! this is what i found.

1. One of the most trusted names is SliceHost
advantage of going with Slicehost - you get your own server(read as a partition, called a slice in this case) to host your site on. You can totally customize, install your OS (any flavor of Linux) your web server(tomcat obv for open source java folks), your choice of database(mysql/postgre sql).

Disadvantages though, you need to setup even the firewall rules, iptables configurations etc. As if you bought your own server which you want to host your application on. Remember there are loads of information available on the site to assit you do this.There are blogs/wiki's/discussion forums etc on slicehost.com

Rates are not bad either 512 MB slice for 30$/month

2.javaservlethosting - This is a regular shared web hosting provider. They would actually do all the work for you, you get to worry about your application thats it. Disadvantage - you have no control on the setup. This one is defenitely for the non tech savy entrepreneurs.

Let me know what you guys think on web hosting provider? I will write about my experience in a few days time. I am defenitely going slicehost way unless you guys suggest something else.






AddThis Social Bookmark Button