Direct buffer allocation

401 views
Skip to first unread message

Sergey Polovko

unread,
Oct 31, 2016, 1:42:14 AM10/31/16
to ne...@googlegroups.com
Hi,

Sorry if this will be duplicate, but it seems that previous message was not sent.

After upgrading Netty from 4.0.35 to 4.1.6 in our project direct memory pool is not used anymore (see brown line in attached graph). This data were received with BufferPoolMXBean.getMemoryUsed() method. We do not use special io.netty.* options, so basically Netty used with default configuration. Also I can’t find in documentation that memory allocation scheme will be changed.
Is this behaviour expected for Netty 4.1.x?

Platform: Linux x86_64
JVM: HotSpot(TM) build 1.8.0_66-b17
GC options: -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Xms2048m -Xmx2048m

--
Sergey

Norman Maurer

unread,
Oct 31, 2016, 1:57:26 AM10/31/16
to ne...@googlegroups.com
Hey Sergey,

by default we now allocate direct memory without going through Bits to eliminate some slowdown which is caused the the openjdk impl.

If you want to have the mean back just use the following system property:
-Dio.netty.maxDirectMemory=0

This will give you the “old” behaviour.

Bye,
Norman


<memory_usage.png>

--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/2571FA2C-EE60-46D2-88F2-1CA14678A522%40yandex-team.ru.
For more options, visit https://groups.google.com/d/optout.

Chris Conroy

unread,
Oct 31, 2016, 11:15:25 AM10/31/16
to ne...@googlegroups.com
Norman,

Do you have a link handy for the relevant change?

Should there perhaps be a different option to retain visibility into NIO memory usage? Seems strange to set the max direct memory to 0 in order to measure direct memory usage!

On Mon, Oct 31, 2016 at 1:57 AM, 'Norman Maurer' via Netty discussions <ne...@googlegroups.com> wrote:
Hey Sergey,

by default we now allocate direct memory without going through Bits to eliminate some slowdown which is caused the the openjdk impl.

If you want to have the mean back just use the following system property:
-Dio.netty.maxDirectMemory=0

This will give you the “old” behaviour.

Bye,
Norman

On 24 Oct 2016, at 16:25, Sergey Polovko <ja...@yandex-team.ru> wrote:

Hi,

Sorry if this will be duplicate, but it seems that previous message was not sent.

After upgrading Netty from 4.0.35 to 4.1.6 in our project direct memory pool is not used anymore (see brown line in attached graph). This data were received with BufferPoolMXBean.getMemoryUsed() method. We do not use special io.netty.* options, so basically Netty used with default configuration. Also I can’t find in documentation that memory allocation scheme will be changed.
Is this behaviour expected for Netty 4.1.x?

Platform: Linux x86_64
JVM: HotSpot(TM) build 1.8.0_66-b17
GC options: -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Xms2048m -Xmx2048m

--
Sergey

<memory_usage.png>

--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/7A4B22BC-9A82-44C6-AEA7-0C3D83AF2BEA%40googlemail.com.
Reply all
Reply to author
Forward
0 new messages