Subject | FB 2.5 Embedded - How much contention to expect from xx threads sharing same attachment? |
---|---|
Author | Olivier Mascia |
Post date | 2010-10-04T16:00:18Z |
Using version 2.5, embedded, windows.
Application server process is multi-threaded, one thread per user.
Each of these threads use a distinct attachment (and hence distinct transactions, statements, ...).
Considering using a single attachment (per DB, per server process), shared among those threads, but still keep thread isolated transactions, statements, and so on...
I'm wondering how much contention will happen between all these threads sharing a same attachment, but using distinct transactions and statements handles.
I expect it to be low, very low, and empirical tests seem to confirm it, though this is still experimental and empirical until live in the wild.
Does theory says the same ?
Would you see reasons not to do so ?
Why am I considering sharing an attachment: to let the application server use a single larger cache than a smaller cache with each attachment. Without loosing other advantages that SuperClient brings to the table in this context.
Makes sense ?
Sounds weird ?
Thanks!
—
Olivier Mascia
Happy Firebird 2.5 Release!
Application server process is multi-threaded, one thread per user.
Each of these threads use a distinct attachment (and hence distinct transactions, statements, ...).
Considering using a single attachment (per DB, per server process), shared among those threads, but still keep thread isolated transactions, statements, and so on...
I'm wondering how much contention will happen between all these threads sharing a same attachment, but using distinct transactions and statements handles.
I expect it to be low, very low, and empirical tests seem to confirm it, though this is still experimental and empirical until live in the wild.
Does theory says the same ?
Would you see reasons not to do so ?
Why am I considering sharing an attachment: to let the application server use a single larger cache than a smaller cache with each attachment. Without loosing other advantages that SuperClient brings to the table in this context.
Makes sense ?
Sounds weird ?
Thanks!
—
Olivier Mascia
Happy Firebird 2.5 Release!