Giter VIP home page Giter VIP logo

Comments (4)

sanel avatar sanel commented on June 13, 2024

Try setting property -Dio.netty.eventLoopThreads=N, where N > 1 at Riemann startup. See [1].

[1] https://github.com/netty/netty/blob/4.1/transport/src/main/java/io/netty/channel/MultithreadEventLoopGroup.java#L41

from riemann.

sanel avatar sanel commented on June 13, 2024

I misread your message, so my comment above might not solve your issue. Try toying with io.netty.recycler.maxCapacity.default as well. netty has builtin recycler to reduce GC pressure, and the value should be > 256 (default is 262144).

Also, this will not solve your problems if you have badly designed streams that will indefinitely aggregate values. Small reproducible example and full stacktrace would be helpful.

from riemann.

Avishai-Ishshalom-Forter avatar Avishai-Ishshalom-Forter commented on June 13, 2024

I should have been clearer: the executor in question is the so called riemann netty event-executor which is where streams are handled and not Netty threads, defined here. The executor is a io.netty.util.concurrent.SingleThreadEventExecutorio.netty.util.concurrent.SingleThreadEventExecutor with default DEFAULT_MAX_PENDING_EXECUTOR_TASKS of int max value, see here - this can be changed by the io.netty.eventexecutor.maxPendingTasks system property. However I believe that this is a bad default for a system like Riemann and also should be set via the Riemann config and not through an obscure Netty system property unknown to most users.

from riemann.

nukemberg avatar nukemberg commented on June 13, 2024

So, it turns out that Riemann is using io.netty.util.concurrent.DefaultEventExecutorGroup which extends io.netty.util.concurrent.MultithreadEventExecutorGroup; every executor in the executor group has its own queue with size io.netty.eventexecutor.maxPendingTasks and Riemann uses (.. Runtime getRuntime availableProcessors) threads, so total queue size is `cpus * maxPendingTasks.

Note that the event executor group chooses an executor queue in a round robin fashion and each channel/socket is bound to an executor. This creates another performance problem as queueing in multiple queues is prone to higher latency and lower throughput (this is a known result in queueing theory - short explanation is that queue lengths have some variation so "evenly distributed" load will queue already overloaded queues). I assume this is done to preserve event ordering as events from the same client will be enqueued and handled in order, but this guarantee is not documented or promised anywhere in Riemann.

from riemann.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.