question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected behavior

Better performance

Actual behavior

Low performance

Steps to reproduce

Write and flush packets. I see REALLY big % on time spent for example from: invokeWriteAndFlush invokeWrite0 -> writePromiseCombiner invokeFlush0 -> writevAddresses

Minimal yet complete reproducer code (or URL to code)

Normal netty.

Netty version

4.1.75 (is there a difference in performance between 5.0?)

JVM version (e.g. java -version)

java version “17.0.1” 2021-10-19 LTS Java™ SE Runtime Environment (build 17.0.1+12-LTS-39) Java HotSpot™ 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

OS version (e.g. uname -a)

Linux ns31343129 4.19-ovh-xxxx-std-ipv6-64 #1818198 SMP Wed Jun 16 15:21:25 UTC 2021 x86_64 GNU/Linux

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
andreasdccommented, Oct 17, 2022

I use netty in Minecraft servers, fork of Spigot and fork of BungeeCord https://github.com/SpigotMC/BungeeCord. you run with many cores? Yes, I run with many cores. do you have DuplexChannelHandlers in your pipeling? I don’t think so. are you using HTTP? I don’t think so. which machine you run the benchmark(s)? Which profiler you mean? I use https://spark.lucko.me/ which load generator? I don’t understand.

In this Spigot’s fork you can see more about how the pipeline is constructed: https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-Server/src/main/java/dev/cobblesword/nachospigot/protocol/MinecraftPipeline.java https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java https://github.com/CobbleSword/NachoSpigot/search?q=netty

1reaction
andreasdccommented, Apr 18, 2022

Going by that profiler screenshot, if it is to be believed, then eliminated 100% of the cost of the write() call, would only make the system 2.08% faster.

It is fine if you can’t share the profiling results. You just have to do more of the investigation work yourself (which is appreciated regardless). I don’t know what profiler you’ve used here. I have had success with Async-Profiler in the past. It can directly produce flame graphs, which is a very useful visualisation for investigating performance issues. If you can then capture your specific scenario that is slow, in a benchmark, then we can take it from there and see if it can be made faster.

2% of cpu is quite a lot, when you have 100% of cpu usage, you will have 98% after correcting this part to 0%. On the profiler from today it shows 2.30%. Another screenshot that might be useful: image Here you have 7.5% for example: image And another 2% here: image Or 2.6% here: image Another screenshots: image image

Combined it takes around 16% of cpu from this particular process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

18 Examples of Low Performance - Simplicable Guide
Low performance is when an employee's work is less than satisfactory. This is less severe than poor performance or serious issues such as ......
Read more >
Dealing With Poor Performance - Lack of Ability, or Low ...
The two causes of poor performance – lack of ability and low motivation – are inextricably intertwined, and goal setting, feedback, and a...
Read more >
Seven Common Reasons for Employee's Low Performance
Seven Common Reasons for Employee's Low Performance · Not the suitable job · Lack of Internal Marketing · Lack of Acknowledgment · Mental...
Read more >
Report summary: Tackling Poor Performance
Poor performance is legally defined as 'when an employee's behaviour or performance might fall below the required standard'. Dealing with poor performance is, ......
Read more >
Managing Poor Performance: 5 Steps - BetterUp
Addressing poor performance at work is an incredibly valuable skill as a manager. We're here with a 5-step guide to helping employees ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found