On Sun, 2 Nov 2008, Josh Berkus wrote:
> I'd start with command-line switches, e.g.
> config --memory=32GB --type=DW --size=500GB --connections=20
That seems reasonable, I think I'll push a fancier UI on the backburner
then and just spec out an options interface like this one.
> I think in initial versions we should just get the info from the admin. I've
> explored the issues around getting OS-independant accurate system stats, and
> they are many.
I'm aware how thorny a perfect solution is here. One thing that's nice
about Python is that there are two interfaces for getting system
information built-in, the os.sysconf I used already and the the
distutils.sysconfig one, aimed more at C-level module writers. Far as
I've been able to tell it's not that hard to get something that works on
most platforms to auto-detect memory and architecture, and I've realized
the latter is kind of important because it determines how big you can make
some things on 32-bit platforms.
After some digging I see there isn't any good interface built-in for
Windows, but it's not hard to ask a DDL for the information. I think it's
reasonable to try and detect total memory+bit width, allow overriding
that, and if detection fails and nothing was specified to error out.
Should make a good balance of reasonable automatic behavior in a lot of
cases, while still allowing the admin to adjust. There's a completely
valid use-case for that even not considering detection failures, where
you're building a config file on a system other than the one it's being
deployed onto.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD