-
Notifications
You must be signed in to change notification settings - Fork 469
Document production limits #1908
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
Conversation
Sounds good to me, @knz. Thanks. |
Review status: 0 of 1 files reviewed at latest revision, 18 unresolved discussions, all commit checks successful. v1.1/limits.md, line 10 at r3 (raw file):
I think it would be good to provide a summary of the major limits before going into how they are derived. v1.1/limits.md, line 29 at r3 (raw file):
"Up to 64MiB on disk" (or maybe "Approximately"). It's rare for a range to be exactly full, and we store the data compressed (but split based on uncompressed size). On the other hand, rocksdb has some space amplification, so growing ranges will take up more space than their actual size until compaction occurs. v1.1/limits.md, line 39 at r3 (raw file):
Write numbers in US style (commas not periods for thousands separators). v1.1/limits.md, line 46 at r3 (raw file):
If we're cpu-limited we should definitely test this. My estimate is that increasing range sizes will reduce CPU usage but increase memory. v1.1/limits.md, line 76 at r3 (raw file):
The size of a range descriptor is influenced by the application: indexing large string columns (for example) will result in larger range descriptors on average due to larger key sizes, and therefore lower overall capacity. v1.1/limits.md, line 78 at r3 (raw file):
Given the variability in range descriptor sizes, "theoretical" probably isn't the right word to use here. v1.1/limits.md, line 79 at r3 (raw file):
The design doc does a similar computation with a result of 4 exabytes. We should compute this limit the same way in both places (updating the design doc if we now have more accurate information about range descriptor sizes). v1.1/limits.md, line 84 at r3 (raw file):
Will it get slower? It should have similar consequences to increasing the max range size. v1.1/limits.md, line 86 at r3 (raw file):
v1.1/limits.md, line 93 at r3 (raw file):
We can call 2^63 "unlimited". However, IIRC databases also result in the creation of a range (which will always be empty), so they do run into the range limit. (Maybe we should stop auto-splitting ranges at schema id boundaries) v1.1/limits.md, line 95 at r3 (raw file):
Indexes/FKs don't create their own range; the only limit for them is that they increase the size of their table descriptors. v1.1/limits.md, line 97 at r3 (raw file):
This is only true if essentially all of your data is in one table. I think that phrasing it this way confuses more than it helps; we should just say that there is no limit on the size of a table except for the total limit on the data size of the cluster. v1.1/limits.md, line 99 at r3 (raw file):
These last two are true, but are they useful? v1.1/limits.md, line 108 at r3 (raw file):
Bring this comment up to the top of this section. It is the relevant limit in nearly all cases, and not the range count or 2^63. v1.1/limits.md, line 112 at r3 (raw file):
1KB seems high for a table descriptor, although some applications use very wide tables that will be even larger. Again, this is highly application-dependent. v1.1/limits.md, line 117 at r3 (raw file):
A row has two sizes: the size of the row itself (roughly equal to v1.1/limits.md, line 128 at r3 (raw file):
Kilobyte-sized primary keys would still be pretty bad. I'd recommend no more than 250 bytes for a primary key, with a strong preference for 8 or 16 bytes. (A few KB is a good guideline for fields used in secondary indexes) v1.1/limits.md, line 133 at r3 (raw file):
We should also discuss the retention of MVCC versions, and that the combined size of a row includes all of its historical versions within the GC TTL (plus some factor to account for the fact that GC is not instantaneous when the TTL is reached). Comments from Reviewable |
@knz, any plans to continue working on this? No rush, but I think it'd be great to have for 1.2. In conjunction, I'll be reworking our production deployment guidance. |
Yes I plan to work on this; however, the core team is currently making changes that heavily influence this document, and I'm waiting for the code to stabilize before I make the corresponding changes. |
@robert-s-lee, @vivekmenezes, @cuongdo, this is the fine-grained production limits document I referenced in our meeting earlier. Based on @knz's last comment, it seems like we need to wait from some core work before proceeding. |
@knz, would you mind adding some details about the core changes that will effect these limits? I discussed this briefly with @petermattis in the docs meeting today, and he wasn't sure what changes you might mean. |
This document is still important. I was chatting with @nstewart last week and Nate highlighted the fact that giving an intuition about performance to users is really at the top of the list for sales (and I found this being stated ironic after one year of me harping on this subject, but hey, better late than never). I am sorry I have not kept this PR up to date but there were a lot of changes in core and it's not directly my team, so it's hard for me to keep up. I think when we want to revive this I'd prefer to work hand-in-hand with someone with the best up-to-date knowledge. |
We have closed this issue because it is more than 3 years |
Fixes cockroachdb/cockroach#15771.
Fixes #1830.
@jseldess the way it's going to work is that I am going to iterate on this with Peter and Ben until we align on the technical content. Then I will hand this PR over to you so you can perform the necessary editorial fixes and cleanups.