Opened 10 years ago
Closed 5 years ago
#783 closed defect (wontfix)
database object caching is too greedy
Reported by: | Dimitar Misev | Owned by: | Dimitar Misev |
---|---|---|---|
Priority: | major | Milestone: | Future |
Component: | reladminif | Version: | development |
Keywords: | Cc: | Peter Baumann, olcl | |
Complexity: | Medium |
Description
The ObjectBroker caches database objects, and does so even when there is no free ram, forcing the server to go into swap memory.
This seriously hampers performance, as free ram is occupied by (arguably) outdated, unused database objects, instead of the objects which are needed for evaluating the current query. It can even block the machine completely, when all the ram+swap is used up.
The proposed solution now is to limit the ObjectBroker to evicting old objects when free ram reaches a critical threshold, instead of only when total ram is filled up. I've set an arbitrary safe threshold of 100MB free ram that rasdaman's cache should not cross.
Change History (11)
comment:1 by , 10 years ago
Status: | new → accepted |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Disregard my previous comment as the cache is cleared at the end of every transaction. The recommendation for a shared cache is still valid though.
comment:4 by , 10 years ago
Milestone: | 9.0.x → 9.1 |
---|---|
Owner: | changed from | to
Priority: | critical → major |
Status: | accepted → assigned |
Deferred for now, will be addressed with Veranika's work.
comment:5 by , 10 years ago
The comment for ObjectBroker
states "The ObjectBroker
can be configured to serve as a cross transaction cache". Is it done by default? I tried some simple queries (selects, updates), but I don't see any calls to ObjectBroker::registerDBObject
, the function which inserts objects to be stored by object broker.
comment:6 by , 10 years ago
I think the caching is done directly in the load*
methods, I guess registerDBObject
is not used.
comment:7 by , 10 years ago
seems like work on this should be synced with Veranika's cache mgr, pls keep her in the loop. Maybe best participate in the next thesis meeting (Mon 10:30).
comment:8 by , 10 years ago
Dimitar, thanks for the note, registerDBObject is not used indeed. However, objectBroker reports everything freed after each transaction is commited/aborted. Is it possible, that some other component silently caches data? postgres driver?
comment:9 by , 9 years ago
Cc: | pbaumann,olcl → pbaumann, olcl |
---|---|
Milestone: | 9.1 → Future |
comment:10 by , 9 years ago
Owner: | changed from | to
---|
comment:11 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Right now it would be best to even evict the whole cache after each query. The reason is that the cache is not shared among rasserver processes. If one query that runs on rasserver N1 fills up the cache, another query on N2 will not be able to run too well as N2 cannot manage the cache of N1.
The ultimate solution is to have a shared rasserver cache.