Skip to content

Replace synchronized blocks with locks for performance in virtual threads #1532

Closed
@kelemen

Description

@kelemen

Log4j uses might be using synchronized blocks on certain hot paths, e.g., RollingFileManager. This might cause performance degradation when such code runs in a virtual thread, since synchronized blocks pin the carrier thread and undermine the whole non-blocking nature promised by virtual threads. To avoid this one can replace synchronized blocks with atomic components, locks, etc.

This ticket aims to find such synchronized usages and replace them with more virtual-thread-friendly constructs.

Metadata

Metadata

Assignees

Labels

enhancementAdditions or updates to featuresperformanceIssues or PRs that affect performance, throughput, latency, etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions