Giter VIP home page Giter VIP logo

Comments (2)

klauer avatar klauer commented on June 3, 2024

Thanks for reporting this @vstadnytskyi-FDA.

I believe the source of this to be:

self.unexpired_updates = defaultdict(
lambda: deque(maxlen=ca.MAX_SUBSCRIPTION_BACKLOG))

where

MAX_SUBSCRIPTION_BACKLOG = 1000 # per subscription

Would you mind lowering this number (to, say, 5) and re-running your test to verify that it's the source?

Continuing the thought process, assuming I'm right here:

This bounded-length list (specifically a deque with maxlen set) would mean it's not a "memory leak" per se; the real issue is that this can result in ballooning memory usage (up to approximately number_of_clients_monitoring * number_of_array_elements * sizeof(array_element) or in your test case 1 * 1000 * 1920 * 1080 * 4 (32-bit int) = around 8.3 gigabytes).

So, while the above may be splitting hairs - let me say that you identified a real deficiency in how caproto handles subscriptions for large arrays. I'm thinking of potentially one or more of the following:

  1. Separate subscription backlog settings for arrays of a certain size
  2. Allow subscription backlog settings to be configured on a per-ChannelData basis
  3. Use the configuration mechanism from (2) to automatically select good settings for this backlog

from caproto.

tacaswell avatar tacaswell commented on June 3, 2024

I think 2 and 3 are the best option

from caproto.

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.