The online postgress DB runs on a powerful server (really), and SOLR search uses a whole cluster of nodes. Both are handling hundreds of requests per second.
Most search queries got answers under 200ms (but it all depends on queries).
Typical web service mean response time is under 50 ms.
But that’s with a typical request rate of ~250 req/s for web service, and 150 req/s for search.
By my standards, that’s still slow, but we are somehow limited by hardware costs.
I don’t think comparing those with a local VM meant to handle only few requests makes much sense.
Did you do actual measurements ?
What about underlying hardware (CPU/RAM/disks) ?
What about underlying operating system ?
Note that online MusicBrainz DB runs a new search server since June 2018 which is quite faster. Next MusicBrainz Server/Docker/VM release will replace the old search server with the new one.
Yes, tuning your postgres installation is very likely the most important thing you need to do in order for it to perform well. I’m not sure exactly how you installed your software, but postgres should have access to 1/4 to 1/3 of available ram in order for it to function well. A default install gives it only a few MB, which makes it… crawl.
@Freso I know how to use a Search Machine
If @rob says “postgres should have access to 1/4 to 1/3 of available ram” I would like to know how to do that with your VM.