2016-11-15 17:05 GMT+01:00 Cédric Krier <cedric.kr...@b2ck.com>: > On 2016-11-15 07:02, Mikhail Savushkin wrote: >> Metrics are: >> >> >> """ >> DBs in Pool RSS, kBytes Added to memory, kBytes >> 0 65,020 - >> 1 86,576 +21,500 >> 2 105,520 +19,000 >> 3 114,520 + 9,000 >> 4 123,708 + 9,000 >> 5 132,444 + 9,000 >> """ >> >> >> And regarding the efficiency - thats why we wanna use "maps", possibly >> stored in some Redis. >> >> Btw, we would be totally happy to just store the entire Pool in Redis and >> fetch it from Redis per request, but as far as I get, serializing Pool is >> practically impossible. >> >> >> As long as we're talking about millions of DBs, this straightforward >> approach wont work. > > On a standard Tryton setup, you should have about 500 classes and I > think the standard RPC call will use at least 20 classes. I do not think > you will have a huge gain by limiting the number of classes you setup in > the pool. Indeed I think you should focus on speeding the init of the > Pool for a database (and implement a garbage collection of unused DB). > Also you could try to dispatch request for the same DB to a subsets of > server. > > By the way, did you test with this changeset: > http://hg.tryton.org/trytond/rev/f1cbb165eefa > > Here are some places where I think there could be improvements: > > - Cache the result of create_graph. This is build using only static > data. > > - Cache the module_list to avoid querying the database, needs to be > cleared when a new module is activated (on update) > > - Improve the __setup__ methods: > > - find better than deepcopy: > http://hg.tryton.org/trytond/file/default/trytond/model/model.py#l46
I'm not sure of what I'll say, but AFAIU deepcopy is used to support several databases (with different modules). Would it be possible to pass a "--single-database" parameter to trytond, so it would just support a single database but it would also avoid deepcopying? Or is there much more work than that? > > - idem for ModelView > > - Improve the __post_setup__ methods: > > - _defaults could maybe be removed > > - idem for _fields (or maybe filled on the first uses) > > > PS: Please do not top-post on this mailing list, see > https://groups.tryton.org/netiquette > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric.kr...@b2ck.com > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ > > -- > You received this message because you are subscribed to the Google Groups > "tryton-dev" group. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tryton-dev/20161115160526.GP16659%40tetsuo. -- Albert Cervera i Areny http://www.NaN-tic.com Tel. 93 553 18 03 -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CADWJ7Gm%2BuH%2BwyfuAiTXJS2VJFka_mGqAXK%3DV8pJ97RUEbnxx5g%40mail.gmail.com.