Using subdocument _id fields for multi-environment support
Stuart Bishop
stuart.bishop at canonical.com
Wed Oct 1 12:46:20 UTC 2014
On 1 October 2014 19:31, Kapil Thangavelu
<kapil.thangavelu at canonical.com> wrote:
> every _id seem like clear wins for subdoc _ids. Although i'm curious what
> effect this data struct has on mongo resource reqs at scale vs the compound
> string, as mongo tries keeps _id sets in mem, when it doesn't fit in mem,
> perf becomes unpredictable (aka bad) as there's two io per doc fetch (id,
> and doc) and extra io on insert to verify uniqueness.
I think it is the index that needs to be kept in RAM, rather than the
actual _id, so it will be a win here. Instead of having 3 indexes to
keep in RAM to stop performance sucking (_id, unit, environment), we
now just have a single fatter one.
--
Stuart Bishop <stuart.bishop at canonical.com>
More information about the Juju-dev
mailing list