Skip to Content

Contributors

multi company: how many companies is too many?

What is the largest number of companies you ever ran in a single (recent 
version) odoo instance?

When does the performance start to degrade because of the record rules 
or company properties?


-- 
Alexandre Fayolle
Senior Software Engineer
Tel : +33 4 58 48 20 30

Camptocamp France SAS
18 rue du Lac Saint André
73 370 Le Bourget-du-Lac
France

http://www.camptocamp.com

by Alexandre Fayolle - 11:46 - 10 May 2022

Follow-Ups

  • Re: multi company: how many companies is too many?
    Hi,

    Record rules make little difference, neither does properties in my experience. The one that can get you if you have a lot of products or customers is cost / pricelist / payment term lookups that table can get slow but a set of partial index resolves those (take care of the NULL case in each one). But you see that issue with as few as 1 company, just obviously the problem multiplies. 

    What can make a difference is postgres performance due to query execution plans on weirdly shaped queries due to the distribution of company_ids in what are naturally much larger tables. You can get some truly awful query planning. However again it is really just a subset of the large data issues.

    In general the standard mitigations, if you have 1 large company and lots of little ones you might do a partial on the large and a partial on everything but the large. You may have to build a lot of composites with company_id as well (I'm not sure postgres optimizes the NOT NULL attribute when ORM searches for NULL companies even when required - such a simple optimization they could do).

    So I guess unlike Pedro, I see issues at 10 companies, but wildly different data distributions and the largest table at 50,000,000 lines. Although usually the worst issues are reserved for enterprise reports which actually access relatively small tables, say 5m records or less, like reconcile tables, but they are date and company dependent and in big joins.

    On Tue, May 10, 2022 at 9:52 PM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
    We have one with 89 without a performance penalty. Maybe the problem is some specific unoptimized rule/s?

    Regards.

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Graeme Gellatly - 11:30 - 10 May 2022
  • Re: multi company: how many companies is too many?
    Running a multicompany instances (96 companies) on Odoo V12.

    Didn't observed performance degradation due to the quantity of companies.

    Some slowness seems to be due to slow functions. (validation of stock moves for example on large orders, or creation of very large invoices).

    However my research regarding the origin of some slowness is limited. if you have a deep analyze, feel free to share !

    Thanks.

    Sylvain LE GAL - Twitter
    GRAP - Service informatique (Groupement Régional Alimentaire de Proximité)
    Site Web | FramaSphere | Facebook
    3 Grande rue des Feuillants, 69001 Lyon
    Standard : (+33) 09.72.32.33.17
    Service Informatique : (+33) 09.73.79.64.40
    Astreinte Informatique : (+33) 06.81.85.61.43
    Member of the OCA (Odoo Community Association)


    Le mar. 10 mai 2022 à 11:47, Alexandre Fayolle <alexandre.fayolle@camptocamp.com> a écrit :
    What is the largest number of companies you ever ran in a single (recent 
    version) odoo instance?
    
    When does the performance start to degrade because of the record rules 
    or company properties?
    
    
    
    -- 
    Alexandre Fayolle
    Senior Software Engineer
    Tel : +33 4 58 48 20 30
    
    Camptocamp France SAS
    18 rue du Lac Saint André
    73 370 Le Bourget-du-Lac
    France
    
    http://www.camptocamp.com
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Sylvain LE GAL - 01:16 - 10 May 2022
  • Re: multi company: how many companies is too many?
    We have one with 89 without a performance penalty. Maybe the problem is some specific unoptimized rule/s?

    Regards.

    by Pedro M. Baeza - 11:51 - 10 May 2022