What makes my app slow?

-1

I have app installed on my RaspberryPi4. My app have utility to search something from database.

It works slow :(

I had this app on another computer and everything worked great.

Why this app is soo slow now?

I think, it's not problem of RAM. I have nearly 600 Mb available memory.

My database takes 20 GB.

Command that checks hard disc speed is: sudo hdparm -Tt /dev/sda1

Output:

/dev/sda1:
  Timing cached reads:   1660 MB in  2.00 seconds = 830.53 MB/sec
  Timing buffered disk reads: 304 MB in  3.01 seconds = 101.08 MB/sec

I thing it's not so bad. Am I right?

To compare, SD card speed checked from rpi forum suggestions are:

write speed: 13,9 MB/s

read speed: 42.8 MB/s

CPU:

My old computer's cpu version was: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz

My new one SoC is: Broadcom BCM2711B0 quad-core A72 (ARMv8-A) 64-bit @ 1.5GHz

I'm not sure where the problem is.

gongarek

Posted 2020-01-09T12:51:37.433

Reputation: 135

4Your i7 920 was/is several times faster then your A72 processor. The turbo frequency was nearly twice as fast and had twice the number required of threads. – Ramhound – 2020-01-09T12:58:52.293

Answers

1

My app have utility to search something from database

Databases need good CPU performance. Obviously here, the SoC CPU is the bottleneck.

What kind of database are you using ? Maybe you can migrate to something simpler (SQLite or even Berkeley DB).

binarym

Posted 2020-01-09T12:51:37.433

Reputation: 320

I am using PostgreSQL – gongarek – 2020-01-09T14:45:49.920

So, yeah, this is definitively a CPU issue. If you really want to run this on a RaspberryPI, you should better migrate to another "simpler" database. – binarym – 2020-01-09T14:55:28.867