Reputation: 2179
I have MongoDb running in a NodeJS app using Monk on a Raspberry Pi 2 with raspbian.
While it behaves properly, the database access is stunningly slow.
I habe roughly 1.7 million documents in one table. I call simple values (last record according to a timestamp) and little more complex (aggregate 30 values). The app writes 2 new entries per second (permantly, it's sort of logging). The client asks for some values, 1-3 per second.
The very simple takes roughly 8 seconds, the little more complex 20 seconds. It does not change over time. CPU is under load, 30 to 75% permanently, I serve just one (1) client via WiFi.
When the results return, the values are correct.
Version information:
Question:
Is known that it's that slow on Raspberry 2 with > 1 mio records and 2-4 requests per second? Or is there something I could do?
The app is completely naive, very straight.
Upvotes: 1
Views: 2637
Reputation: 195
When you look at performance in a Raspberry PI you have to take care of two important limitation:
Said that we can't make any more precise analysis without the details of DB, query and program. What you can do is to use "top" or any similar command to show the usage of RAM, the CPU load and the IO from disk.
Upvotes: 2