fabiomix / forza-horizon-telemetry

Collect, store and display telemetry data from Forza Horizon
15 stars 2 forks source link

kinda big delay #1

Open KillzTheSpy2 opened 2 months ago

KillzTheSpy2 commented 2 months ago

i thought it would be in realtime. It refreshes about every second and i've tried everything. I've changed the grafana config to refresh every 100ms, even the influxdb and telegraph configs. Nothing changes the refresh rate. Any help?

fabiomix commented 2 months ago

Hi KillzTheSpy2.

This project has been developed and tested on a low-end notebook (dual-core 2.0GHz, 4GB RAM, non-SSD disk) and it can collect one metric every second just fine. The primary scope of the project is to collect and STORE telemetry data, and I thought that the current settings for Telegraf can achieve this purpose. Maybe with different hardware it's possible to push these limits and have better results.

To increase data frequency I can suggest (if you haven't already tried these) to:

Be aware of the "[outputs.influxdb] did not complete within its flush interval" error if Telegraf output is faster than InfluxDB input.

I'm still trying in my spare time to optimize this setup for better performance and even if I would like - one day - to replace the Python script with GoLang, I think that the bottleneck here is InfluxDB (UNCONFIRMED). I didn't see big improvements with InfluxDB v2.

If you don't need to store data, you can switch to WebSocket. Grafana can receive WebSocket and Telegraf has an output plugin for it. See Stream metrics from Telegraf to Grafana.

This bypasses InfluxDB completely. Even on a low-end PC, you should receive 60 packets/sec in Grafana, which is almost real-time I would say, but you need to rewrite the dashboard queries.

This solution has no storage, and I can't/won't (for now) remove InfluxDB from the stack since this project started as an excuse to play with InfluxDB.