martinmeinke / rlog

Raspberry Pi based logger for KACO Powador inverters
6 stars 0 forks source link

database does not make timing any more #46

Closed stylpen closed 9 years ago

stylpen commented 10 years ago

The triggers are too complicated. My rasPi is running at 800Mhz but it takes up to 20 seconds per iteration. My target is 10s and almost never met. I blame our trigger concept for that. Now, that I've got everything in C++ (yes, it's not 100% ready but still) it pretty much didn't help at all. The daemon takes only a minimal fraction of the execution time - and the c++ code is on average only 2 seconds faster than the python implementation - but that does not matter as python seems to be "fast enough" for this task if there wasn't the database.

I'd try and start an experiment that computes the aggregation in the daemon and causes much less database reads (not a single one in the best case). I just want to insert the final values into each table and not let the triggers do the job. We could save lots of performance here I hope ?!

stylpen commented 9 years ago

timing is no issue any more with postgresql on banana pi with hdd (except maybe for a litte drift in the order of 100 ms / min but that is in the range of OK)