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

High resolution interval support #48

Closed
nokute78 opened this issue Mar 3, 2016 · 14 comments
Closed

High resolution interval support #48

nokute78 opened this issue Mar 3, 2016 · 14 comments
Milestone

Comments

@nokute78
Copy link
Collaborator

nokute78 commented Mar 3, 2016

We can pass a argument 'nanoseconds' to flb_input_set_collector_time().
But the value seems not to be used.(Only 'seconds' is used.)

I wrote a patch and it seemed to work.
But I modified some lib/monkey files which come from Monkey project.

# Changed but not updated:
...
#   modified:   ../lib/monkey/mk_core/include/mk_core/mk_event.h
#   modified:   ../lib/monkey/mk_core/mk_event.c
#   modified:   ../lib/monkey/mk_core/mk_event_epoll.c
#   modified:   ../src/flb_engine.c

So, which do you prefer?

  1. Pull Request to fluent-bit.
  2. Pull Request to Monkey Project. (I have never used , so I can't test it.)
  3. Do nothing. Someone will fix. :)

Thanks.

@edsiper
Copy link
Member

edsiper commented Mar 3, 2016

Interesting feature to enable.

The right way will be to open the PR with http://github.com/monkey/monkey in the GIT master, then I can rebase the changes back here.

note: this change needs to be applied to epoll, kqueue and select backends.

@nokute78
Copy link
Collaborator Author

nokute78 commented Mar 4, 2016

Thank you for your advice!
So, I will open a Issue and a PR with Monkey project.
I will modify fluent-bit after rebasing from Monkey project.

The resolution depends on timer source.
So I want to make a new API to sleep milliseconds. (it may be difficult to support microseconds in all environment.)

note: this change needs to be applied to epoll, kqueue and select backends.

You mean that I shout modify _mk_event_timeout_create() of
mk_event_epoll.c, mk_event_kqueue.c and mk_event_select.c. right?

@edsiper
Copy link
Member

edsiper commented Mar 4, 2016

Yes, you are correct, otherwise Fluent Bit on OSX will only support seconds (when compiled for OSX it uses the kqueue backend).

just curious, what's your use case where you need milliseconds ?

@edsiper edsiper added this to the 0.8 milestone Mar 4, 2016
@nokute78
Copy link
Collaborator Author

nokute78 commented Mar 5, 2016

Yes, you are correct, otherwise Fluent Bit on OSX will only support seconds (when compiled for OSX it uses the kqueue backend).

OK.
Thank you for your technical information.

what's your use case where you need milliseconds ?

I think it is helpful to perform accelerated life testing.
To reveal a bug which is taken a long time to reproduce.
Rare timing issue, tiny memory leak which is happened every timer event, and so on.

@edsiper
Copy link
Member

edsiper commented Mar 5, 2016

I think the it can go beyond that like "real time" collection (not real OS real time but the same approach: low latency).

@nokute78
Copy link
Collaborator Author

nokute78 commented Mar 6, 2016

I think so, too.
This support will be useful to collect data of some sensors which frequently sense.

Note : I opened a issue at Monkey project.
monkey/monkey#232

@edsiper
Copy link
Member

edsiper commented Mar 11, 2016

note: @nokute78 already added high resolution support in Monkey core through:

monkey/monkey#232
monkey/monkey#232

I will keep this issue opened until we start v0.8 development to add this high resolution and/or realtime feature.

@nokute78
Copy link
Collaborator Author

Thank you for updating.
I'm waiting for new version.

edsiper added a commit that referenced this issue Mar 17, 2016
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
edsiper added a commit that referenced this issue Mar 17, 2016
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
@edsiper
Copy link
Member

edsiper commented Mar 17, 2016

merged and compiling. All yours :)

@nokute78
Copy link
Collaborator Author

Congratulations on new release.

I will write a patch using this feature soon.
(But, I have no time on this weekend :( )

Thanks!

@edsiper
Copy link
Member

edsiper commented Mar 18, 2016

let's keep this issue open, so that feature can be referenced later.

@nokute78
Copy link
Collaborator Author

Sure.

The PR (#59) is used this feature.

edsiper added a commit that referenced this issue Mar 21, 2016
Engine: collector and in_head support high resolution interval (#48)
@edsiper
Copy link
Member

edsiper commented May 4, 2016

@nokute78 I reviewed the referenced issues and looks like this one is ready to be close, would you please confirm ?

@nokute78
Copy link
Collaborator Author

nokute78 commented May 5, 2016

@edsiper Sure. I will close this one.

@nokute78 nokute78 closed this as completed May 5, 2016
fujimotos pushed a commit to fujimotos/fluent-bit that referenced this issue Jul 22, 2019
* Update kubernetes filter docs

* Update buffer_size description in Kubernetes filter docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants