Friday, August 17, 2012

A useful service that can help you analyze any site.

Statsgram.com is a useful service that can help you analyze any site.

I particularly liked the Summary and the "Search Queries" section.

Thursday, August 16, 2012

How to set the max heap size in C#?

I had this basic question  How to set the max heap size in C#? which got resolved by a link shared by my colleague.

"The .Net heap will grow, as needed, to consume all available memory. There's
no need to manually adjust it.

On x86, you'll be limited about 1.5gb, regardless of how much memory you have
on your system.

On x64 or IA64, the limits are much, much higher.

If you're doing "Big" calculations, and memory is a concern, just run under
x64 and make sure your code is set to "Any CPU". This does mean you need x64
hardware, and a 64-bit O/S installed (XP x64, Vista x64, Windows 2003 x64)."


Sunday, August 12, 2012

Out of Memory - Permanent Generation Space

The permanent generation is the area of heap that holds all the reflective data of the virtual machine itself, such as class and method objects  +  it also holds internalized strings.

 If an application loads “too many” classes or uses “too many” internalized strings, then it is possible it will abort with an OutOfMemoryError. The specific error is Exception in thread XXXX java.lang.OutOfMemoryError: PermGen space.

A way to find out whats occupying the PermGen space is using a simple command ->  jmap -permstat

Internalized strings can occupy space due to wrong usage of intern() in the code. You can find more details about this here - http://www.codeinstructions.com/2009/01/busting-javalangstringintern-myths.html

Refer URL for more details -
http://www.oracle.com/technetwork/java/javase/tooldescr-136044.html#gblmm