TLAB ( Thread Local Allocation Buffers )
2014-05-03 00:00
148 查看
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.
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.
相关文章推荐
- ExtJs的Hello World
- Effective Java 68 Prefer executors and tasks to threads
- js 弹出浮动层
- XAML制作Win8磁贴样式
- List转换成JSON对象
- List转换成JSON对象
- 初学HTML一些基本控件语句
- 2.1Bootstrap3.0栅格系统
- List转换成JSON对象报错(五)
- List转换成JSON对象报错(五)
- List转换成JSON对象报错(四)
- List转换成JSON对象报错(四)
- 霸气侧漏的HTML5--之--canvas(1) api + 弹球实例
- List转换成JSON对象报错(三)
- List转换成JSON对象报错(三)
- 表格样式
- List转换成JSON对象报错(二)
- List转换成JSON对象报错(二)
- List转换成JSON对象报错(一)
- List转换成JSON对象报错(一)