[IPython-dev] DictDB

MinRK benjaminrk@gmail....
Tue Mar 5 11:26:49 CST 2013

On Tue, Mar 5, 2013 at 6:58 AM, Dave Hirschfeld

> In my ipcontroller_config.py script I've got the following line:
> c.HubFactory.db_class = 'IPython.parallel.controller.dictdb.DictDB'
> I noticed in the log lots of messages about results being culled and
> found that the DictDB has `size_limit`, `record_limit` and `cull_fraction`
> attributes
> https://github.com/ipython/ipython/blob/master/IPython/parallel/controller/dictd
> b.py#L92
> There doesn't seem to be any mention of them in the config file so I was
> wondering how to set these values.
> I assumed it might be something like
> c.HubFactory.db_class.size_limit = 10737418240
> c.HubFactory.db_class.record_limit = ...
> c.HubFactory.db_class.cull_fraction = ...
> ..but was wondering how I could verify if these settings had worked - e.g.
> is
> there a way to query the controller settings?

There is not a way to query the controller's state,
but this is not quite how config works.  The way to think about config is
setting class attributes,
so to set the size limit of a DictDB object, you would do:

c.DictDB.size_limit = 2**30

There is not instance-like notion where the name might change, depending on
where it is assigned,
it is always keyed by the name of the configurable class.

> Thanks,
> Dave
> NB: Is the default 1MB or am I reading it wrong?

This was a dumb typo, I wonder why it hasn't been caught before.

Both DictDB's exclusion from help output and the default value should be
fixed by: https://github.com/ipython/ipython/pull/2997

> size_limit = Integer(1024*1024, config=True,
> help="""The maximum total size (in bytes) of the buffers stored in the db
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130305/f1b88a53/attachment-0001.html 

More information about the IPython-dev mailing list