Quote:
Originally Posted by Cubical
I'm concerned about your claim that it locks up under heavy load as I know SQLite allows concurrent reads and writes and is even used is corporate applications that require it. I assumed properly indexing was adequate enough. Is it just an issue with how it's implemented in Graal or is that more of a personal opinion?
|
The main problem is that SQLite does not scale well in general in environments where you have lots of things trying to read and write from/to the database at the same time. It's really not a good choice for this kind of usage; a real database server like MySQL or PostgreSQL would scale much better. They are designed for these kind of environments. I suspect the only reason Stefan went with SQLite over a better-scaling database is because it's so much simpler to implement and manage (it's designed to be embedded, after all), especially when we talk about each server having many databases and the need for the servers to be able to mess with them easily.
I also strongly suspect large SQLite databases are resulting in lots of IO traffic on Era which is causing other scripts that want to do IO to wait and results in the ridiculous locks we see all the time on Era and the other servers on Era's machine. I know Stefan was very upset a few years back about large SQLite databases on Era and blamed them for slow servers. They can cause iowait even in scripts which don't use SQL at all (although this should be lessened since Stefan disabled the option which forces writes to be flushed to disk immediately AFAIK).
Nothing wrong with using SQLite, but don't abuse it. Stefan has indicated in the past that he would be willing to set up something like MySQL for iPhone servers, although I never took him up on that offer.