Code Monkey home page Code Monkey logo

kollekt-cplusplus's Introduction

Background

kollekt++ is the C++ version of kollekt (written in Scala) and there is also a NodeJS version, kollekt-node.

These tools do collect data streams via multiple UDP packets and flushes them to disk on different criteria.

Research Subjects

  • time effort (cost) vs. productivity/usability/maintenance-time
  • source code readability
  • performance
    • memory usage
    • CPU load
  • scalability (single core vs multi core distribution)
  • stability
    • out-of-memory handling
    • CPU exceeding

kollekt++ Resource Usage

File Descriptors

  • stdio: 3 by default (0, 1, 2)

    • stdin (0) could be closed
    • stdout (1) should be connected to the same log stream as stderr (2)
  • UDP listener: 1

  • event polling (libev): 2

    • one for epoll
    • one for eventfd
  • bucking writing to disk: 1

  • per bucket:

    • pipe: 2 (reader and writer)

    stdio_fd = 3 event_fd = 2 listener_fd = 1 log_fd = 1 core_fd = stdio_fd + event_fd + listener_fd + log_fd bucket_fd = 2

    max_fd(max_buckets) = core_fd + max_buckets * bucket_fd

Memory

  • sizeof Bucket: N

Memory should grow linear + N with the number of buckets in userspace plus the buckets buffer size in kernel-space.

CPU

CPU load should not increase with the number of buckets.

New Strategie Try

  • the main thread is acting as message reader and coordinator thread
  • 1 writer thread
  • N worker threads for, each managing a set of buckets in a hash.
    • each worker has its own distinct key space (with 2 workers: 1 for the first half (a.g. 0..8) and the second for 9..f)

kollekt-cplusplus's People

Contributors

christianparpart avatar

Stargazers

 avatar

Watchers

 avatar

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.