Log Analysis with Ram Optimization

Source: Internet
Author: User
D/dalvikvm: <GC_Reason> <Amount_freed>, <Heap_stats>, <External_memory_stats>, <Pause_time>
The system recycler prints the memory recycle status at intervals. The log Content format is the preceding format. Below is a detailed description
<Reason for recovery> <total amount of memory recycled> <percentage of available memory> <external memory status> <recovery time>
D/dalvikvm( 9050): GC_CONCURRENT freed 2049K, 65% free 3571K/9991K, external 4703K/5261K, paused 2ms+2ms
 
 
GC reason GC collection reason (what triggers the collection and what types of collection) contains the following types
Gc_concurrent concurrent collection
When your program stack reaches the maximum value, the memory is recycled concurrently.
Gc_for_malloc is recycled During allocation
If your program requests memory but the stack is full, the system will stop your program and reclaim the memory.
Gc_hprof_dump_heap when you create an hprof file to analyze the memory stack.
Gc_explicit precise release
The program explicitly requires memory collection, such as calling GC (it is best to avoid active calling. We should believe that the recycler will automatically recycle the memory when needed)
GC_EXTERNAL_ALLOC
This happens only on API level 10 and lower (newer versions allocate everything in the Dalvik heap ). A garbage collection for externally allocated memory (such as the pixel data stored in native memory or NiO byte buffers ).
Amount freed
Total recycled memory
Total memory collected by the recycler.

Heap stats
Available memory percentage
Available memory percentage = 100%-used memory/available memory

External memory status
Only devices with an API of 10 or less will have one. Allocated memory/total number of reusable memory
Pause Time
Recycling time
The larger the memory stack, the longer it takes to recycle it. There are two concurrent release times: the start time of collection and the end time.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.