Wednesday, October 24, 2012

JVM Memory Management


JVM Memory Structure

Heap and Non-Heap Memory
The JVM memory consists of the following segments:
  • Heap Memory, which is the storage for Java objects
  • Non-Heap Memory, which is used by Java to store loaded classes and other meta-data, StringPool
  • JVM code itself, JVM internal structures, loaded profiler agent code and data, etc.


JVMMemorylayout
Heap
The JVM has a heap that is the runtime data area from which memory for all class instances and arrays are allocated. It is created at the JVM start-up.
The heap size may be configured with the following VM options:
  • -Xmx<size> - to set the maximum Java heap size
  • -Xms<size> - to set the initial Java heap size

By default, the maximum heap size is 64 Mb.
Heap memory for objects is reclaimed by an automatic memory management system which is known as a garbage collector. The heap may be of a fixed size or may be expanded and shrunk, depending on the garbage collector's strategy.
Non-Heap
Also, the JVM has memory other than the heap, referred to as non-heap memory. It is created at the JVM startup and stores per-class structures such as runtime constant pool, field and method data, and the code for methods and constructors, as well as interned Strings.
Unfortunately, the only information JVM provides on non-heap memory is its overall size. No detailed information on non-heap memory content is available.
The abnormal growth of non-heap memory size may indicate a potential problem, in this case you may check up the following:
  • If there are class loading issues such as leaked loaders. In this case, the problem may be solved with the help of Class loaders view.
  • If there are strings being massively interned. For detection of such problem, Allocation recording may be used.

Stack
The stack is the memory set aside as scratch space for a thread of execution. When a function is called, a block is reserved on the top of the stack for local variables and some bookkeeping data. When that function returns, the block becomes unused and can be used the next time a function is called. The stack is always reserved in a LIFO order; the most recently reserved block is always the next block to be freed. This makes it really simple to keep track of the stack; freeing a block from the stack is nothing more than adjusting one pointer.

Generational Collection

       When a technique called generational collection is used, memory is divided into generations, that is, separate pools holding objects of different ages. For example, the most widely-used configuration has two generations: one for young objects and one for old objects.


    Young generation collections occur relatively frequently and are efficient and fast because the young generation space is usually small and likely to contain a lot of objects that are no longer referenced. 
     Objects that survive some number of young generation collections are eventually promoted, or tenured, to the old generation. See Figure 1. This generation is typically larger than the young generation and its occupancy grows more slowly. As a result, old generation collections are infrequent, but take significantly longer to complete.


HotSpot Generations

Memory in the Java HotSpot virtual machine is organized into three generations: a young generation, an old generation, and a permanent generation.

The young generation consists of an area called Eden plus two smaller survivor spaces, as shown in Figure 2. Most objects are initially allocated in Eden.






Garbage Collection Types


When the young generation fills up, a young generation collection (sometimes referred to as a minor collection) of just that generation is performed. When the old or permanent generation fills up, what is known as a full collection (sometimes referred to as a major collection) is typically done.

Serial Collector
With the serial collector, both young and old collections are done serially (using a single CPU), in a stop-theworld fashion. That is, application execution is halted while collection is taking place

Parallel Collector
These days, many Java applications run on machines with a lot of physical memory and multiple CPUs. The parallel collector, also known as the throughput collector, was developed in order to take advantage of available CPUs rather than leaving most of them idle while only one does garbage collection work.
                        
Concurrent Mark-Sweep (CMS) Collector
For many applications, end-to-end throughput is not as important as fast response time. Young generation collections do not typically cause long pauses. However, old generation collections, though infrequent, can impose long pauses, especially when large heaps are involved. To address this issue, the HotSpot JVM includes a collector called the concurrent mark-sweep (CMS) collector, also known as the low-latency collector





Tuesday, October 9, 2012

Scorpion Sting and Anti Venom

During my recent trip to India i found a scorpion in our home and fortunately it didn't sting any one.

Here is what it looked like (in our regional language it is called "Mandragabba" )


I was told the strings are quite dangerous and it made me think what first aid options we have in case of a sting ( apart from calling the local doctor and we live in a village and needs at least couple of hours to go to a decent hospital with all the facilities).

Disclaimer: I am not a Doctor. Use the following info at your own risk.

There is an antidote (Prazosin) available in India and here are few links related to it.Here is the info on this drug and the brands that manufacture it.


USA:

In US Antivenom is available and it is called "Anascorp". It's quite costly. Though it costs a fraction in Mexico.






India


Treatment details


Tuesday, June 19, 2012

Strings i have tried so far

All these days i never paid any attention to the Strings. What ever String the racquets came with i used them.

 I String my own racquets and hence have more freedom in trying out various combinations.

And i don't break strings that often.

How ever after reading through many tennis forums i now have decent idea reg various Strings and started experimenting with various String setups.

Here is the list of Strings i am using so far :

1) Gosen OG Sheep Micro      (Synthetic String)

   Good and cheap synthetic string. Mostly used for crosses in a hybrid setup

2) Gosen polylon                      (Poly)

    First generation poly. If you have arm problems stay away from it.

3) Forten Nylon                        (Cheap Nylon String)
    Dead cheap string. Good for String breakers. Can be used as a Cross in Hybrid setup

4) Pro's Pro Hitec Multi Fibre   (Multiflament)

    Softest multi. Haven't played with it yet

5) Poly Star Classic                  (Poly)


      Stiffness Ratings


           Company           String           Material     Guage       Stiffness(lb/in)      Tension Loss(lbs)
           Ploy Star         Classic 17        Polyester         1.22                232                        22.23
           Ploy Star         Classic 16        Polyester         1.28                235                        22.14

6) Poly Star Profile                   (Poly)





Applying for Re Entry Permit

In order to apply for a Re Entry permit (after getting the Greencard).

One needs to file I-131 and here is the checklist.

1. $445 ($360 for I-131+ $85 for Bio Metric) check made out to "US Department of Homeland Security"
2. completed I-131
3. Copy of Green card
4. Copy of my Passport All Pages
5. 2 US passport photos
7. Supporting documents for travel. (Explaining the reason why i need to stay for longer period abroad).
8. Optional G-1145 Form.

I got my Re Entry permit and it is valid for two years !!.

For my it took close to two months.

Thursday, June 14, 2012

USTA League Results

I Started playing in a USTA League and so far my record is 3-1.

I am only Playing Singles (3.5). Our team hasn't lost yet !! We are 7-0.

Here are my Results so far.


Thursday, May 17, 2012

Yonex RD Ti 70 Long

I am able to get couple of Yonex RD Ti Long racquets in 7.5 condition and i am really happy with them.

I need to string one of them and waiting for my Strings to arrive from TW.

I had a hitting session and though this is the first time i played with a Yonex racquet (Box shaped head) i didn't notice any difference and i had good control over all my shots.

The one played with weighed 361gm and the unstrung one weighed  ~345gm.  These racquets are 27.5in long (half inch longer than the standard length which is 27 inch).

Here are the pics.














and it seems this racquet is discontinued and is hard to find.

Here are the specs from archived TW web site.


Head Size:
98 sq. in. / 632 sq. cm.
Length : 27.5 inches / 70 cm
Construction :
19-20 mm
Composition :
High Modulus Graphite & Titanium Mesh/Ultima Ti Shaft
Strung Weight :
12.1 ounces / 343 grams
Power Level: Low
Babolat Racquet Diagnostic
Center (RDC) Data:

Stiffness: 62 (0-100)
Inertia: 321 (200-400)
Power: B, 50 (0-100)
Control: B, 52 (0-100)
Manueverability: A, 73 (0-100)
Stroke Style: Full
Swing speed: Fast
Balance: 11pts Head Light
Racquet Color:
Red w/Black & Silver Highlights
Grip type:
Yonex Leather Grip
String Tension:
50-60 pounds
String Pattern:
18 Mains / 20 Crosses
Mains skip: 8T,10T,8H,10H
Two Piece
No shared holes

Monday, January 30, 2012

Thoughts on Superbowl Weekend

Both the games (NE Vs BAL & SF Vs NY) were really close and even though i was rooting for either NE Vs NY or BAL Vs SF super bowl i was little disappointed the way Baltimore lost to NE.

After watching Rey Lewis's post game speech (Link Here) i appreciate what it takes to be a leader and inspire others where every one is searching for the scape goat or coming up with theories what could have happened if some thing did this , referee making a mistake etc.

As Bellichick famously quoted "stats are for losers"  It's time to move on and learn from your mistakes (missed opportunities).

I will be rooting for NE against Giants and i hope they will settle the score this time and i won't have a sleepless night as it was the case in 2007.

As far as Ravens are concerned it was a great season and lot of positives..

1) Flacco stepped up big time in crucial games
2) Just need to draft good center , Left Tackle and line backers.

Ball Badminton

Recently when i was browsing through the badminton forum i saw a thread where few guys were asking about ball badminton.

This is what i have played during my childhood till i was in high school and it's very interesting game which was very popular in rural Andhra during that time.

When i was a little kid (i was in elementary) i used to go to the high school which was next to our house and watch the high school kids and adults play badminton every day (My father used to play a lot). That's how i picked it up and i played every day during my school years.

Went to Inter school competitions and when i was a senior (10th grade in india) we won the zonal (Inter district) as well as inter zonal (District) level championship.

During that time every year there used to be an open invitational tournament conducted in our village during First & second week of January . Generally the finals will be scheduled on Sankranthi.

I don't think any one is playing this beautiful game in rural India any more.

I used to have few racquets ( Raja , Pitchaiah  and Narayana are the well known manufacturers of the ball badminton racquets during that time).

I will try to post the pictures when i go to India. I am sure i have those old racquets some where in our house.!!

This game is played with 5 players each side (two of them play Front one Center and couple of backs).And it's played best of three games.

Each Game has 29 points and from 25 the points are called with names.

25 - Sub Notice
26 - Notice
27 - Home Ball
28 - Game Ball
29 - Game Up.

And each side will have 5 Serves (one per each person). And you can only win points on your side's serve.



Monday, January 23, 2012

Championship weekend

Really looking forward to the AFC Championship Game. What else can i ask for the teams i root for are playing in this game. Only sad part they both are in AFC.

It was a great last week as the Teams i was rooting for all won.

Giants are playing good foot ball and so are the 49ers. So it will be an interesting game. I am predicting this one will be a low scoring game considering both the defenses are good ( Muddy field is on the cards for this weekend in SF).

 And when ever Patriots and Ravens play i am torn as i don't want either one to loose. Everyone is predicting a NE win but i think it will be a close game. As long as there are no major injuries and not a blown out game i will be happy..


Friday, January 20, 2012

CAPping my Head PT 280

I was lucky enough to get a Made in Austria Pro Tour 280. Structurally it is in sound condition. How ever the bumper guard took a beating.


I started restoring it and ordered a CAPed Grommets from Tennis Warehouse and this post shows how the racquet looked before and after.

Here are the Specs of this frame

Head Size:
97 sq. in. / 626 sq. cm.
Length : 27 inches / 69 cm
Construction :
20 mm Constant Beam
Composition :
High Twaron and Graphite
Strung Weight :
12 ounces / 340 grams
Power Level: Low
Babolat Racquet Diagnostic
Center (RDC) Data:

Stiffness: 58 (0-100)
Inertia: 320 (200-400)
Power: B, 40 (0-100)
Control: B, 60 (0-100)
Manueverability: A, 73 (0-100)
Stroke Style: Long, Full
Swing speed: Fast
Balance: 8pts Head Light
Racquet Color:
Black, Blue, w/ Red Lettering
Grip type:
Cushion Grip
String Tension:
50-60 pounds
String Pattern:
18 Mains / 20 Crosses
Mains skip: 9T,8H,10H
Two Piece
No shared holes

Head Radical Tour Bumblebee

I am fortunate enough to get couple of Head Radical Tour (Made in Austria) Oversize racquets. And here are some of the pics.

As you can see the bumper guard is in rough condition i replaced with new bumper guard and grommets.





















NFL Wildcard Weekend

Finally the Playoff football is here and this week fortunately or unfortunately my teams (Ravens and Pats) are not playing .

It will be interesting to see who the divisional opponent will be for both these teams.

Lot of people already gave Steelers the victory over Denver.

The only game i will be watching with specific interest is this game as one of our bitter rival will be playing.

Hopefully it will be a good game . Does Denver has anything to loose ?? Denver has good defense and if their offense can score few points it will be tough for Pittsburg.

Tuesday, January 3, 2012

Sydney Test !!

The first day of Sydeny test is over and i didn't realize the Test match started today and the only best thing that happened is i didn't have to watch another collapse of the so called best batting lineup.

Only Tendulkar seems to be in control till he dragged on to his stumps.

Zaheer bowled well in the later part of the day. ( Or is it the case of these "great" modern day batsman playing as expected against a moving ball we are so accustomed to see these days).

Thank god Terry Alderman is not bowling to these batsman..Oh wait these batsman are not good enough to even get an edge of those deliveries..!!

Let see how this test unfolds.





Friday, December 30, 2011

Bill Maher Tweet about Tim Tebow

Most of you might have seen the Bill Maher's tweet about Tebow and Denver Vs Bills game.

I thought he is so creative. Don't get me wrong i have nothing against Tebow or Jesus or Christianity (Of no affinity for Satan or Hitler).

In case you (outside US and don't follow football) don't know who Tebow is and what Tebowing is see the pic.


And here is Bill's tweet..


Thursday, December 29, 2011

Match Savers is an Endangered Species

After watching the fourth day of Boxing day test i wonder whether there are any Match savers in modern day cricket. Not sure whether the advent of T20 has contributed to more tests not ending in a draw .It might be more because of lack of batsman who can grind it out and save test matches.

Now a days we either see teams chasing 300 plus runs in fourth innings or getting all out for less than 150.

We may never see any thing close to what Mike Atherton did in Johannesburg.



 More so because in the current generation of batsmen there are not many who has the technique to bat like him, Dravid etc.

Any way all credit to AUS for a well deserved victory.


Wednesday, December 28, 2011

The Girl with the Dragon Tattoo

I watched the dubbed version of the original "The Girl with the Dragon Tattoo" and it's a great movie. Thoroughly enjoyed watching it.

Not sure how the new version is going to be.

But i recommend watching the original if you have NetFlix !!.



If you are interested in finding more about the Author Stieg Larsson & and the movie...

 http://en.wikipedia.org/wiki/The_Girl_with_the_Dragon_Tattoo

Monday, December 26, 2011

Boxing day test match & Dan Marino's Record etc


India's tour of Australia:

As India started touring Aus and I always liked the cricket matches in Aus (big grounds, pacy wickets) I am following the current series and as I am writing this it's second day and tendulkar and Dravid are playing and it looks like it is going to be a good game.

Dan Mario's record:

I watched the saints and falcons game briefly and as expected the saints dominated the game at home. And Drew brews surpassed 27 years Dan Marion's record. Congrats Drew (he came close to breaking it couple of years back). So he is well deserved all the credit.

How ever when you look back after a decade and our next generation might not even talk about Dan Marion's record. I think what Marino achieved with the defenses during that era is much harder to replicate. (I am very disgusted with the new rules in the past year or so which are so biased towards offense. We can no longer see the dominant defenses in play !!!)

At least i was privileged to watch some of the best defenses in the recent past ( I am huge Ravens fan and the games against pittsburg is what i enjoyed most apart from colts-pats games during the min 2000's).

Two handed backhand:

I started experimenting with two handed backhand and it's really a pleasant surprise. I am able to generate more power and has better control on placing the ball. I grew up idiolising Lendl, Sampras and Federer and I always tried to imitate their style.

and my one-handed back hand has always been my week area in my game and recently I thought why not switch to double handed backhand ?

When I tried earlier i never felt it was natural to me till I tried few weeks back with my ball machine.

May be all these i was trying to trying mimic the shots i saw some of my favorite players played with so much ease rather than finding what suits my game. Only time will tell whether that's true :-)

Friday, December 16, 2011

Head Radical Tour

There are three versions of Radical Tours

 1) Bumblebee /Radical Tour 630/ Trisys 260 (USA) is the Original Radical Tour  1993-1995


 2) Zebra  Twin Tube 1995

 3) Radical Twin Tube 1998


Agassi has used all the three models (at least the paint job on his racquets says so :-))

Bumblebee:





  

  Note: it comes with black grommets/bumper guard. the white grommets shown in some of the above images are the grommets from Youtek Radical.

    Now here is the picture of Agassi using the racquet with same paint job.

   Also it's same as today's Head PT57A.

Monday, November 28, 2011

My Racquet Collection

I love playing Tennis and have collected a good amount of Tennis Racquets over the past couple of years.

Here is the List of Racquets i have:

Wilson:
  •   Wilson Prostaff Mid  (St. Vincent Version)
  •   Wilson Prostaff Original 6.0 95
  •   Wilson ProStaff Zone 7.1
  •   Wilson Prostaff ROK 93 
  •   Wilson Prostaff classic 6.1 si 95 & 110 Sq 
  •   Wilson Profile Tour
  •   Wilson Ultra 2
  •   Wilson Hyper Hammer

Head:
  •   Head Radical Tour MP (Bumblebee)
  •   Head Radical Tour Trisys 260 Oversize 
  •   Head Radical Tour XL (Zebra) MP
  •   Head Liquid Metal Prestige MP
  •   Head i Prestige Mid
  •   Head Ti Radical MP
  •   Head Tour Xtra Long MP
  •   Head Liquid Metal Radical MP
  •   Head Pro Tour 280 MP
  •   Head Team Pro
  •   Head Pro SE MP
  •   Head Master SE
  •   Head Pro tour Trysys 300
  •   Head Graphite Edge
Dunlop:

  •   Dunlop Areogel 200
  •   Dunlop Aerogel 300

Wednesday, May 4, 2011

Latest Documentaries

I have been watching lot of documentaries of late (always liked the documentaries) and here are some i have watched recently which are really good.

 Inside Job : I have watched few tv episodes and some documentaries related to the financial meltdown and this provided the best insight. And the scary thing is things haven't changed a bit after all what we have gone through..The same people are still running the show..!!



This way of Life: Haven't watched it yet.The trailer was pretty good..