Now, the “PendingDbRequest” counter is steadily on zero. but it was worth the effort).Īfter restarting the D2000 Archiv process, the number of connections to the PostgreSQL server has increased. So, we change WriteThreadsCount from 2 to 10 (implementing this feature took a few weeks. This way, multiple parallel write connections are used to insert data into the PostgreSQL database. let’s say 10 (so that every archived point can have its own task). We will increase the number of parallel write tasks from 2 to. The magic trick is using multiple parallel write tasks. The D2000 Archiv has a number of performance optimizations up its sleeve! One of them was developed to handle the load of large systems, but it can be utilized to suppress the influence of network latency. This can be explained – more CPU time could be dedicated to running communication when the PostgreSQL archive database was moved away from the RPI.Īnd this is what the CPU load looks like:ĭo we give up now, defeated by network latency? No way. What’s interesting – comparing the numbers with a “PostgreSQL on RPI” scenario from the original blog, the number of inserted values actually increased (from around 1290 - 1390 to 1700 - 1800). After a few minutes, I see a growing number of the “PendingDbRequest” counter, meaning the network latency (or a Windows Server) prevents us from writing fast enough and some values are waiting in D2000 Archive’s memory queues on an RPI. Let’s stop the slow communication and start a fast one! So, this was rather boringly uninteresting. Postgres is nowhere to be seen (it is still used by kernel as a configuration and logging database, however, it does pretty much nothing right now). There are 2 connections for writing, one for reading (I didn’t change this default), one for periodic deleting of old data, and the last one for writing configuration changes.Īnd let’s see RPI load: archiv, kom, kernel, event. Just to be sure that we are writing to another server: Starting reading of 100 measured points once a second:ĭatabase is empty (size 11 MB), PerformedDatabaseRequest=100 (per second), RPI can keep up ok. ![]() Now, let’s try to start out basic configuration. So a “ping” utility is reporting around 0.3 ms latency. There are at least 2 more switches on the way to a Windows Server. So we are connected to a remote server (172.16.10.50) running a 32-bit version of PostgreSQL 9.6.īy the way, the RPI is connected to a 100 MBit switch in my office. It means that the path where the archive database is located (which is obviously a Windows path on a Windows server) cannot be queried for available free space (so that „database disk is almost full“ warnings cannot be issued).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |