> Local network access
In what production scenarios do MySQL, Postgres, DB2, Oracle, et. al., live on the same machine as the application that uses them?
I am pretty sure most of these vendors would offer strict guidance to not do that.
It’s not a stretch to imagine that a scenario where you’re willing to run SQLite locally is also one where it’s acceptable to run Postgres locally. You’ve presumably already got the sharding problem solved, so why not? It’s less esoteric of an architecture than multiwriter SQLite.
Like 95% of websites that aren’t Amazon or google? Ton of sites that run in a single small vm. Postgres scales down quite nicely and will happily run in say, 512MB.
Re:IO Devices and Latency
by crazygringo on Friday March 14, 2025 @09:19AM
(#43362372)
> I am pretty sure most of these vendors would offer strict guidance to not do that.
Then you'd be wrong. Running Postgres or MySQL on the same host where Apache is running is an extremely common scenario for sites starting out. They run together on 512 MB instances just fine. And on an SSD, that can often handle a surprising amount of traffic.
As popularity grows, the next step is to separate out the database on its own server, but mostly as a side effect of the fact that you now need multiple web servers, but still a single source of truth for data. Databases are lighter-weight than you seem to think.
In the scenario where you were choosing between it and SQLite...
Re:IO Devices and Latency
by bobmcnamara on Thursday March 13, 2025 @11:52PM
(#43359433)
Context switches plus mmap accesses are often slower than mmap accesses.
I’ve tested this before and Postgres is measurably faster over Unix socket than over local network.
Re:IO Devices and Latency
by badmintonbaseba on Friday March 14, 2025 @05:29AM
(#43360924)
You don't have IPC for sqlite, do you?
Re:IO Devices and Latency
by nolist_policy on Friday March 14, 2025 @05:45AM
(#43360993)
You do of you access the same database from miltiple processes.
Re:IO Devices and Latency
by badmintonbaseba on Friday March 14, 2025 @10:08AM
(#43362791)
What IPC mechanisms exist between sqlite processes accessing the same database, other than file locking and some atomic IO operations ensured by the OS.
[citation needed]. Local network access shouldn't be much different than local IPC.