-
-
Notifications
You must be signed in to change notification settings - Fork 98
Use dedicated partitions for each layout #2096
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
I'd be curious to benchmark this. If I get it right, it introduces concurrency as function of unique schemas/layouts. |
d5048fd
to
d92ea68
Compare
0a29187
to
e558403
Compare
d92ea68
to
f636b54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this briefly in a call earlier, and I wanted to write my thoughts down somewhere: This is mostly done, but some important adjustments are yet missing.
- The memory usage for this is through the roof. We need to scale down the default partition size.
- Queries currently go to all active partitions, which is just unnecessary now. We probably should register active partitions with the
meta indexcatalog, although I'm not quite sure if that should be part of this PR. It's not critical, but definitely warrants a follow-up story that we tackle in the short- to medium-term. - The biggest issue in practice when using this is low-volume types never being flushed to disk, because the partition size is set globally. We need some timeout parameter after which we close an active partition, similar to how we have a both a batch-timeout and a batch-size for the table slices produced in the sources.
This makes sense. Regarding memory usage, I want to raise the concern of slicing out types from record batches that keep alive large chunks of memory while only a small fraction is ever needed. This is the |
@mavam We already detach the schema in table slices, so this is not a concern. |
Since we now have a dedicated active partition for each layout, importing suricata data doesn't push out zeek conns any more. The solution is to import one more zeek conn event to make sure the previous data is written to disk.
f636b54
to
acff288
Compare
We now have more partitions, so the output of lsvast grew larger.
I veto this approach. The catalog has no business with active partitions and it must stay that way. We want to be able to run the active and passive parts of the database on different nodes, and such a change would only add communication overhead. |
👆 That. Exactly. Let's not couple things together can operate in a decoupled manner. For this PR, it's completely fine to not run queries over active partitions (or "partition builders"). |
…geneous-partition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed the changes we discussed, @tobim. I approve of yours earlier in the PR, but would really like to see this PR get reviewed and tested by someone else. @dispanser maybe?
00838ec
to
4c35bd2
Compare
…geneous-partition
c523996
to
70614f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobim I am approving of your changes. If you approve of mine, please go ahead with the merge.
I approve of @dominiklohmann 's changes as well. |
This makes it possible to use homogeneous partitions, so only the data from one particular event type ends up in a partition.
Requires #2120!
📝 Checklist
🎯 Review Instructions