New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4147] Allow to disable recycling #4157

Closed
wants to merge 1 commit into
base: 4.0
from

Conversation

Projects
None yet
3 participants
@normanmaurer
Member

normanmaurer commented Aug 28, 2015

Motivation:

Sometimes it is useful to disable recycling completely if memory constraints are very tight.

Modifications:

Allow to use -Dio.netty.recycler.maxCapacity.default=0 to disable recycling completely.

Result:

It's possible to disable recycling now.

@normanmaurer normanmaurer self-assigned this Aug 28, 2015

@normanmaurer normanmaurer added this to the 4.0.31.Final milestone Aug 28, 2015

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Aug 28, 2015

Member

@trustin please check

Member

normanmaurer commented Aug 28, 2015

@trustin please check

private static final AtomicInteger ID_GENERATOR = new AtomicInteger(Integer.MIN_VALUE);
private static final int OWN_THREAD_ID = ID_GENERATOR.getAndIncrement();
// TODO: Some arbitrary large number - should adjust as we get more production experience.
private static final int DEFAULT_INITIAL_MAX_CAPACITY = 262144;

This comment has been minimized.

@trustin

trustin Aug 28, 2015

Member

Should we stick to this default value? /cc @normanmaurer @tea-dragon

@trustin

trustin Aug 28, 2015

Member

Should we stick to this default value? /cc @normanmaurer @tea-dragon

This comment has been minimized.

@normanmaurer

normanmaurer Aug 28, 2015

Member

@trustin for now yes. Let us use a new pr if we want to adjust it

@normanmaurer

normanmaurer Aug 28, 2015

Member

@trustin for now yes. Let us use a new pr if we want to adjust it

@trustin

This comment has been minimized.

Show comment
Hide comment
@trustin

trustin Aug 28, 2015

Member

Could we log that recycler has been disabled explicitly?

Member

trustin commented Aug 28, 2015

Could we log that recycler has been disabled explicitly?

@trustin

This comment has been minimized.

Show comment
Hide comment
@trustin

trustin Aug 28, 2015

Member

Just one trivial comment about logging. How about logging 'disabled' instead of '0' in the logging statement here?

Member

trustin commented Aug 28, 2015

Just one trivial comment about logging. How about logging 'disabled' instead of '0' in the logging statement here?

[#4147] Allow to disable recycling
Motivation:

Sometimes it is useful to disable recycling completely if memory constraints are very tight.

Modifications:

Allow to use -Dio.netty.recycler.maxCapacity.default=0 to disable recycling completely.

Result:

It's possible to disable recycling now.
@netkins

This comment has been minimized.

Show comment
Hide comment
@netkins

netkins Aug 28, 2015

TeamCity pull requests :: netty Build 138 is now running

netkins commented on ddbc5fe Aug 28, 2015

TeamCity pull requests :: netty Build 138 is now running

This comment has been minimized.

Show comment
Hide comment
@netkins

netkins Aug 28, 2015

TeamCity pull requests :: netty Build 138 outcome was SUCCESS
Summary: Tests passed: 4749, ignored: 21 Build time: 00:28:14

netkins replied Aug 28, 2015

TeamCity pull requests :: netty Build 138 outcome was SUCCESS
Summary: Tests passed: 4749, ignored: 21 Build time: 00:28:14

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Aug 28, 2015

Member

Cherry-picked into 4.0 (01c29e5), 4.1 (1a9ea2d) and master (910ae03)

Member

normanmaurer commented Aug 28, 2015

Cherry-picked into 4.0 (01c29e5), 4.1 (1a9ea2d) and master (910ae03)

@normanmaurer normanmaurer deleted the disable_recycle branch Aug 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment