Things Developer Should Aware[Page Breaks]

Java based application တွေကို load test လုပ်တဲ့အခါ JVM warm up ဆိုတာလုပ်ရတယ်။
ဘာလုပ်တာလဲဆိုတော့ application ကို load test မလုပ်ခင် နည်းနည်းသုံးပေးထားရတာ။

ဘာလုပ်ဖို့လိုတာတုန်းဆိုတော့ JVM တွေရဲ့အလုပ်လုပ်ပုံက JIT ကိုသုံးတာ
JIT သဘောက just in time လိုတော့မှ java byte code ကို native code အဖြစ်ပြောင်းတာ။
အဲ့တော့ ခနခနပြောင်းနေရင် ဘာဖြစ်လဲဆိုတော့ cost ကုန်တယ် bytecode ကနေ native code ကို Java application run နေတုန်းပြောင်းရတာကိုး

အဲ့တော့ ရှိသမျှ code ကိုမပြောင်းဘူး hot spot ကိုသုံးတယ်။
ဆိုချင်တာက method တခုပေါ့ ဘယ်နှခါ run မှ အဲ့ bytecode ကို ိုnative code ပြောင်းမယ်ပေါ့။
ဥပမာ exception code တွေသည် တခါတလေ rare case မှ ထ run တတ်တာအဲတော့သူတို့ကို native code ပြောင်းထားတာက မကိုက်ဘူး ။

အဲ့တော့ ခုနကလို ခနခန run တယ်ဆိုတဲ့ code မျိုးကိုပဲ JIT ပြောင်းတယ်၊။
JIT ပြောင်းတော့ ပိုမြန်တယ် native code ကိုတန်း run ရလို့။

ဒါမို့ ခုနက warm up ဆိုတဲ့ process လိုလာတာ။

Original link =>(https://m.facebook.com/story.php?story_fbid=pfbid0334c4Z5MC6Hr6LVLVNxw53H3awYk2YELdbjXr7A3YKi1AG1Qk7JUDoh5ndrvhMg3Al&id=1819241055&mibextid=Nif5oz)

Leave a comment