Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set storage_driver_buffer_duration shorter than 1 minute? #1074

Closed
dmehra opened this issue Jan 22, 2016 · 4 comments
Closed

How to set storage_driver_buffer_duration shorter than 1 minute? #1074

dmehra opened this issue Jan 22, 2016 · 4 comments

Comments

@dmehra
Copy link

dmehra commented Jan 22, 2016

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
@vishh
Copy link
Contributor

vishh commented Jan 23, 2016

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.

@dmehra
Copy link
Author

dmehra commented Jan 23, 2016

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

@vishh
Copy link
Contributor

vishh commented Jan 23, 2016

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).

@dmehra
Copy link
Author

dmehra commented Jan 27, 2016

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants