Skip to content

How to set storage_driver_buffer_duration shorter than 1 minute? #1074

Closed

Description

@dmehra

I'm running cadvisor-canary:latest build, sending data to InfluxDB, and trying to set -storage_driver_buffer_duration to a lower value than the default 1 minute, so I'd be able to chart current data from influx rather than having a delay. I thought that was working when I ran a release build in Nov-Dec with influx v0.8, setting -storage_driver_buffer_duration=2s.

The reason I'm now running canary is to have influx v0.9 support, since that's what I need. When I tried setting the duration to 2s, the actual delay I saw was 2 minutes. That seems to match the setting to 60*time.Second in this code unless I'm misreading it. Trying a fractional value -storage_driver_buffer_duration=0.1 resulted in not seeing data in influxdb for several minutes (then i stopped waiting).

I'm now running with -storage_driver_buffer_duration=1m but would like a shorter delay.

This is the exact command line in my docker-compose file:

  image: google/cadvisor-canary:latest
  command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxdb:8086 -logtostderr=true -v=9 -stderrthreshold=9 -storage_driver_buffer_duration=1m

Activity

  1. vishh commented on Jan 23, 2016

    @vishh
    Contributor

    AFAIK, you can set that flag to a shorter duration. Is that not working for
    you?

    On Thu, Jan 21, 2016 at 9:41 PM, Daria Mehra [email protected]
    wrote:

    I'm running cadvisor-canary:latest build, sending data to InfluxDB, and
    trying to set -storage_driver_buffer_duration to a lower value than the
    default 1 minute, so I'd be able to chart current data from influx rather
    than having a delay. I thought that was working when I ran a release build
    in Nov-Dec (with influx v0.8, setting -storage_driver_buffer_duration=2s.

    The reason I'm now running canary is to have influx v0.9 support, since
    that's what I need. When I tried setting the duration to 2s, the actual
    delay I saw was 2 minutes. That seems to match the setting to
    60*time.Second in this code
    https://github.com/google/cadvisor/blob/master/storage/common_flags.go
    unless I'm misreading it. Trying a fractional value
    -storage_driver_buffer_duration=0.1 resulted in not seeing data in
    influxdb for several minutes (then i stopped waiting).

    I'm now running with -storage_driver_buffer_duration=1m but would like a
    shorter delay.

    This is the exact command line in my docker-compose file:

    image: google/cadvisor-canary:latest
    command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxdb:8086 -logtostderr=true -v=9 -stderrthreshold=9 -storage_driver_buffer_duration=1m

    —
    Reply to this email directly or view it on GitHub
    #1074.

  2. dmehra commented on Jan 23, 2016

    @dmehra
    Author

    Correct, when I set -storage_driver_buffer_duration=2s the actual delay is 2 minutes, not seconds.

  3. vishh commented on Jan 23, 2016

    @vishh
    Contributor

    Do the logs give any clues?

    On Fri, Jan 22, 2016, 6:47 PM Daria Mehra [email protected] wrote:

    Correct, when I set -storage_driver_buffer_duration=2s the actual delay
    is 2 minutes, not seconds.

    —
    Reply to this email directly or view it on GitHub
    #1074 (comment).

  4. dmehra commented on Jan 27, 2016

    @dmehra
    Author

    When I tried running again with -storage_driver_buffer_duration=2s on a newer canary build, it worked as expected, doing writes to influx every 2 seconds. I cannot explain the earlier behavior; closing this issue as not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions