New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Memory / Settings Matrix #49
Comments
Reply from #47 @JedMeister - I too wondered what this means. I did some reading (what I could find) and seems it's only used for multi processes. (were workers number is greater that 0) There are modules that require this mode to be enabled. This limit is not very well documented. I only found places from google where people were having the problem and were told to increase this number (some by a huge amount). What I did was kept changing the hard limit until it started working. 1.5G was that number. I watched the processes in TOP and I did not see any of the processes go over that limit while processing a bunch of PDF reports. According to Odoo Docs
Other reads I found: |
Did some testing This is at the peak of creating a database with demo data and installing one module
|
Did more some testing This is at the end of installing 5 modules and getting ready to print 7 quotes
|
Did more some testing This at the peak of printing 7 quotes
|
@JedMeister - In testing above, just loading demo data and a few modules Odoo like memory. Odoo is not light on resources. Link below says 4G for memory and multi processors. This makes the max memory I set to seem small if Odoo https://www.odoo.com/nl_NL/forum/help-1/question/server-hardware-specification-for-small-setup-62565 |
I still need to talk with Alon about the thoughts I had re upping the current RAM defaults (x2 - as I mentioned elsewhere). My thought is that we should give Odoo at least 512; probably more. My understanding is that it's not a recommendation; more of a minimum... Does that sounds reasonable? Suggestions? Thoughts? |
512 would run but you could overload the system pretty quick with lots of modules and users. 1GB would be better. I saw were they were recommended 4GB |
I would say: Could have a Matrix for Number of Users perchance. I think most people using this will start as small business. However, if enterprise wants to take it on they can certainly afford to give more horsepower. |
Remember that the VM can be changed after the fact and anyone installing ISO will be mostly probably on physical hardware. |
See #52 (comment) for details on what was found |
I feel pretty good about 2 Processors and 2gb Memory Micro .612 gv and variable ecu (likely too small) Can we have 3 Workers or must the units be even numbered? My Plan won't let me see the M3 Large Settings which Cost the Same as the C1 below The Small should be able to Run. About what I am checking now Cost does not quite double (.044 per hr to .067 and .087 per hr) |
From web site about workers
|
Just to be clear:
The one we need to pay attention to is the soft limit. As these workers will stay alive and hold on to memory until that limit is reached. So if you have 5 workers and the soft limit is 256MB you could end up with 5 workers each taking 256MB that's 1.25GB of RAM that could be taken up. If you only had 1GB of ram you may need to dial back your workers or your soft limit. It's a balancing act of sorts, I am also not sure if keeping the processors at say 350 or 400 if there is some caching effect. Not sure why it's holding on to the memory. If the math on the workers is
Just remember that the process can go beyond the soft limit, it's just once the request is over it give up it's memory. So if you have a lot of workers (multi-people hitting the server) there is a good chance the workers could go over the soft limit, however it will free up memory when it's done with the request. |
@JedMeister - Your thoughts on the subject |
Let me work through those numbers. I had not jumped passed 4 gb and a algorithm does make sense. |
And Perhaps we could actually add some comments to this effect in the /etc/openerp.conf? Plus document as well... Otherwise sounds all good to me.. 😄 |
Yes in bytes And yes I was planning on doing some documentation in the config file |
I propose the following: A word on tuning your TurnkKey Linux Odoo ServerA lot of time has gone in to testing this TKL appliance, and one thing we Most of this text here was taken from the Memory Matrix Discussion It is important to note that you can run Odoo in threaded mode by setting the --workers is how many new process will be started to perform work or The "limit_memory_soft" limit is the amount of ram that when a process The hard limit is the amount of ram that if the process goes over it, The one we need to pay attention to is the limit_memory_soft. It's a balancing act of sorts, I am also not sure if keeping the Hardware Matrix for recommended values:
Note: Max Memory if notice is less than total memory this is on purpose. As
Calculations on how we got the above chart M = Total memory in bytes (1048576 = 1MB) For ram 512 to 999MB 1GB - 1.99GB 2GB - 3.99GB 4GB - 7.99GB 8GB + 11.99GB 12GB + Memory Matrix Discussion |
Will use the above values in the docs |
Sounds good Ken. |
I set it to the smallest we could that the pdf still worked |
Regarding the limit_memory_hard option and why it seems to need at least 1.3G see #62 (comment) |
Looks great! 👍 |
@DocCyblade I still don't get it.
M = 33554432000 12GB + |
This, I recall, was based upon Odoo Requirements, and DocCyBlade's calculations and my testing as to what is required memory wise to be able to Print PDF documents in Odoo 8.0 TurnkeyLinux build. There is more to Odoo than PDF printing but it was a real hurdle to get over from several points. A few Odoo links (not read in detail today) are below: https://www.odoo.com/forum/help-1/question/reduce-memory-usage-54636 https://www.rosehosting.com/blog/how-to-speed-up-odoo/ https://stackoverflow.com/questions/41361358/how-to-increase-the-default-memory-usage-in-odoo |
@DocCyblade can you please explain ? |
What this points to is that the Server, ideally, is configured based upon the workload put to it. It is a common problem with Turnkey Apps that Memory settings get fixed by the install when the install can often accommodate much larger allocations to different processes. In the Odoo situation, at a minimum, if you wanted to be able to generate a PDF invoice and email to your customer (pretty much the point of a ERP system) you need a certain amount of memory. If you had "workers" out there synchronizing with different APIs, you need memory allocated to those purposes. This was well explained back when the first TKL Odoo App was created. I fear that the documentation of it was removed in the "stripping" that tends to occur. I will look to see if I can find the full explanation. |
Doc's Post (directly above) from Oct 17, 2015 is pretty complete. Still more discussion, particularly in relation to the current build should take place. Odoo may have changed some pretty key elements. Workers for instance may be Jobs now (or vis a versa) but using different memory calls. Doc Wrote there: The "limit_memory_soft" limit is the amount of ram that when a process The hard limit is the amount of ram that if the process goes over it, The one we need to pay attention to is the limit_memory_soft. |
@l-arnold thank you for the explanation, I would like to know how @DocCyblade got the values in the table above. I may miss something as @pambudisatria said here the values are different ?!
|
Hi all, |
EDIT POST:
A word on tuning your TurnkKey Linux Odoo Server
A lot of time has gone in to testing this TKL appliance, and one thing we
learned while testing was tuning. For all the why we chose these numbers you
can take a look at he issues on GitHub (links at the botton of this article)
Most of this text here was taken from the Memory Matrix Discussion
#49 (comment)
It is important to note that you can run Odoo in threaded mode by setting
the workers option to 0 however there are some modules that won't work
and you loose fine grain control of resource management.
the --workers is how many new process will be started to perform work or
(answer requests) The workers have limits upon them set by the limit_xxxxx
options here in the config file.
The "limit_memory_soft" limit is the amount of ram that when a process
goes over this limit after it is done with the request it is terminated
and the memory it was using is freed. This amount goes for each process
The hard limit is the amount of ram that if the process goes over it,
it WILL terminate right then. (I don't think this is really correct
because of the PDF issue we had and set this to 1.3 GB and never
saw a process take this much. but if its below 1.3GB PDF are not created)
The one we need to pay attention to is the limit_memory_soft.
As these workers will stay alive and hold on to memory until that limit
is reached. So if you have 5 workers and the soft limit is 256MB you could
end up with 5 workers each taking 256MB that's 1.25GB of RAM that could
be taken up. If you only had 1GB of ram you may need to dial back your
workers or your soft limit.
It's a balancing act of sorts, I am also not sure if keeping the
workers at say 350 or 400 if there is some caching effect. Not sure
why it's holding on to the memory.
Hardware Matrix for recommended values:
(Note these are for REAL hardware, Virtual Hardware has it's own
issues that can arise with too many guest on a host with too many
CPU cores etc, so remember that when looking at the chart below)
(One other note that when I tested these, I did use VMware but
no other VMs where competing for resources)
(One last note, really. These numbers are to show the relationship
between the config settings and hardware. We also assume you are running
the database server on the same server. I know at some point in the
higher numbers that this would not be the case. These are not numbers
set in stone nor numbers gotten from Odoo. These are numbers I have
come up with from the testing I have done. Real world examples if you
have them would be great and these numbers can and should be updated!
Note: Max Memory if notice is less than total memory this is on purpose. As
workers process requests they can grow beyond the Mem Per limit so a
server under heavy load could go past this amount. This is why there
is "head room" built in.
Calculations on how we got the above chart
M = Total memory in bytes (1048576 = 1MB)
W = Workers (
workers
)CW = Cron workers (
max_cron_threads
)TW = W + CW
For ram 512 to 999MB
((TW * 0.45 ) + TW) / M = limit_soft_memory
1GB - 1.99GB
(TW * 0.40 ) + (TW - 1) / M = limit_soft_memory
2GB - 3.99GB
(TW * 0.35 ) + (TW - 1) / M = limit_soft_memory
4GB - 7.99GB
(TW * 0.30 ) + (TW - 2) / M = limit_soft_memory
8GB + 11.99GB
(TW * 0.25 ) + (TW - 3) / M = limit_soft_memory
12GB +
(TW * 0.15 ) + (TW - 3) / M = limit_soft_memory
Memory Matrix Discussion
#49
Shakedown Testing Discussions
#52
#53
#54
#55
The text was updated successfully, but these errors were encountered: