3 ms·
sorry not to make it obvious in the article, I'm planning to run it in small iot pi based device locally. So having something small and fast is preferable, howe
by wejick 5y ago
sorry not to make it obvious in the article, I'm planning to run it in small iot pi based device locally. So having something small and fast is preferable, however the runtime performance is a more important thing I haven't touch.
- ts4z 5y agoI'm curious -- is it the binary size that's a problem, or the resident size in memory? Demand paging should help, although you'd be stuck with carrying the enlarged binary.
- wejick 5y agomy gut feeling tell it will be both memory and cpu utilization. cant be sure, until I can find good way to measure it.
- SuperQue 5y agoIf only there was a monitoring system you could install to measure such a thing.
- ts4z 5y agops RSS measurement is pretty good for a start (although note in a forked process, shared copy-on-write pages are both reported as RSS for both the parent and child process). top reports this as RES. IIRC, debugging information is in a separate part of the process, so it's not loaded until it's used. Does that make it free? Probably not quite, but the kernel can ignore it until the process (presumably via its debugger) looks at it.
- jeppesen-io 5y agoPrometheus is rather efficient, but it's focus is a little different than yours. Its designed to for large scale collection of metrics, scraped from many remote endpoints You can run it locally but the "prometheus" way for iot env would be a central prometheus server that scrapes the iot devices running a prometheus exporter, which tend to be very light weight
- wejick 5y agoTotally agree. Another part of it is just feeding curiosities.
- deleted 5y ago[deleted]
- SuperQue 5y agoPrometheus works fine as-is on Pi devices. You'll spend most of your memory on ingestion buffering. I did the same tests as you did a while back, it only saves like 25-50MiB of memory IIRC. The only thing you really need to worry about on a Pi is that the default kernels are still 32-bit, and are set to 2GiB kernel boundary. So you'll be limited to how much TSDB storage can be mmap'd unless you switch to a 64-bit kernel. You may want to consider agent mode on your IoT device, and stream the data to an external server/service. https://prometheus.io/docs/prometheus/latest/feature_flags/#prometheus-agent https://prometheus.io/docs/prometheus/latest/feature_flags/#...
- wejick 5y agoThat's a good insight. Thanks