TLAB ( Thread Local Allocation Buffers )
2013-09-30 16:40
253 查看
Reprint:http://robsjava.blogspot.com/2013/03/what-are-thread-local-allocation-buffers.html
When new objects are allocated on the heap, if TLAB
( Thread Local Allocation Buffers ) are enabled, the object will first be placed in the TLAB, this
buffer only exists within eden space. Each thread has its own TLAB to allow faster memory allocation, as the thread is able to allocate additional
memory within the buffer without a lock. The TLAB is pre allocated for each thread. As a thread uses memory within the TLAB it moves a pointer accordingly.
To
enable TLAB set ‐XX:+UseTLAB, You can set the size allocated to the the TLAB via ‐XX:TLABSize, its default size is 32k or if you prefer you can use the ‐XX:+ResizeTLAB to
allow dynamic resizing of the TLAB.
Using
TLAB, uses more of your Eden space, but you may get a slight performance benefit when creating objects.
The amount of memory allocated to all your TLAB's will be proportional to the number of threads in your application.
When new objects are allocated on the heap, if TLAB
( Thread Local Allocation Buffers ) are enabled, the object will first be placed in the TLAB, this
buffer only exists within eden space. Each thread has its own TLAB to allow faster memory allocation, as the thread is able to allocate additional
memory within the buffer without a lock. The TLAB is pre allocated for each thread. As a thread uses memory within the TLAB it moves a pointer accordingly.
To
enable TLAB set ‐XX:+UseTLAB, You can set the size allocated to the the TLAB via ‐XX:TLABSize, its default size is 32k or if you prefer you can use the ‐XX:+ResizeTLAB to
allow dynamic resizing of the TLAB.
Using
TLAB, uses more of your Eden space, but you may get a slight performance benefit when creating objects.
The amount of memory allocated to all your TLAB's will be proportional to the number of threads in your application.
相关文章推荐
- TLAB ( Thread Local Allocation Buffers )
- TLAB Thread-local allocation buffer
- thread-local-allocation-buffers
- java内存分配之 Thread Local Allocation Buffer
- java内存分配之 Thread Local Allocation Buffer
- Avoiding Full GCs in HBase with MemStore-Local Allocation Buffers: Part 1
- Avoiding Full GCs in HBase with MemStore-Local Allocation Buffers: Part 2
- Avoiding Full GCs in HBase with MemStore-Local Allocation Buffers: Part 3
- Atitit usrqbg1821 Tls 线程本地存储(ThreadLocal Storage 规范标准化草案解决方案ThreadStatic
- ThreadLocal、ThreadLocalMap、Thread关系详细解析
- java.lang.ThreadLocal 深入理解
- 线程本地存储TLS(Thread Local Storage)的原理和实现——分类和原理
- Tomcat6集成Red5后,关闭时报错The web application [] created a ThreadLocal with key of type [null]的解决方法
- Java ThreadLocal
- hibernate中的ThreadLocalSessionContext和Transaction的关系
- ThreadLocal与InheritableThreadLocal的区别
- InheritableThreadLocal源码阅读
- ThreadLocalRandom
- Communication with HDFS: Exception in thread “main” java.io.IOException: Failed on local exception:
- 错误:created a ThreadLocal with key of type ……but failed to remove it when the web application was stopped. This is very likely to create a memory leak.