Repository navigation
crimson/os/seastore: increase journal size and decrease rewrite-dirty size - #46310
Conversation
|
TODO: perserve the original settings for tests. |
|
@xxhdx1985126 after the configuration changes, the conflicts due to onode extents are much lower now, see |
There was a problem hiding this comment.
I'm fine with this pr.
But I think we still need a machinery to deal with conflicts. The reason is as follows:
- We can't prove the this configuration works for all scenarios, when put into production environments, io workloads and other runtime environment factors may change from time to time and we can't manually change the configurations all the time, so, if we can implement some mechinary to solve this problem once and for all, wouldn't that be much better?
- In this pr, although we see much improvement on the transaction conflict part, we don't see proportional perf improvement, and according the previous tests, if we can reduce the transaction conflicts and not involve other perf bottleneck, we should see an according perf improvement, so I think changing these configurations can be actually reducing the transaction conflicts at the cost of introducing other bottlenecks, although I can't tell specifically what kind of bottlenecks for now.
Generally speaking, I think we should rely on foundamental architecture functions to avoid the conflicts when it's worth it. What do you think? @athanatos
|
@cyx1231st I think the reason that increasing the journal size can reduce the conflicts between gc transactions and io transactions is because the longer the journal is, the less possible that extents at the journal tail get modified by io transactions, am I right? |
|
Adding my thoughts:
|
Yes, longer dirty buffer between trim and user transactions can decrease the changes of conflicts. |
|
I think the rados bench test keep creating new rados objects, am I right? |
Under this scenario, longer journal means each dirty extent can stash more mutations before rewrite. IIUC the overall trim efforts are decreased, so does the conflict. |
I really doubt this, many people involve ML to do this kind of work, like SageDB. |
Yeah, like I said, the automation work is trivial, but the configurations can still be exposed. |
Yes, but that means, if any factor affecting the perf changes at the runtime, system administrators have to manually change the configurations. Chances are that this kind of change may happen frequently. |
No, I think, under this scenario, journal gets longer while the length of the dirty list stays still, so no matter how many mutations it holds before rewrite, the amount of the trim work stays the same. I mean, although we change the |
If the |
|
@xxhdx1985126 if I understand you correctly, you are referring to the following case: But I'm not sure if this is a common or realistic workload in SeaStore. Even updating a limited range of object data will involve a considerable number of fresh data extents, and updating a limited range of object metadata will involve undeterministic side-affects about omap tree node split and merge, right? Even if that case is possible, we can always mitigate the issue by decreasing the config |
I actually think this is a very common case, there are always hot zones on disk where user modifications targets right? I think few user would create a workload that access the whole disk space with uniformal probability. Am I right? The hotter those zones are, the less this configuration change would work, am I right? And even if users access their disk space uniformally, if user data only fills a relative small part of the seastore disk space, we can still see the same effect.
Yes, I actually think increasing journal size also have its advantage in the most strict scenario, but we need to test it to see how far it can go. I'm working on that part now, to see how well this kind of configuration adjustment can work in the above cases. |
|
Real test results are more convincing than just debates. BTW, @xxhdx1985126 do you have quick scripts to test the scenario "users keep modifying a limited number of objects"? I can also test it locally. |
I don't have much scripts since the test is relative simple. I'm using the rbd interface, create a rbd image, and use fio to issue uniformal random writes to it. That's pretty much of it:-) |
Hot rbd lba ranges for rbd images would indeed be common (though time varying). This does not at all mean that rbd lba ranges will on average be accessed with uniform probability. It certainly does not mean that all sesatore lba will be accessed with uniform probability. Increasing the journal length should proportionately reduce journal rewrite work independently of workload since each extent rewritten would have seen a proportionately larger number of updates since the last rewrite. I don't think there are any scenarios where this wouldn't help. |
|
@xxhdx1985126 If decreasing conflict rate doesn't improve throughput, I think it suggests that the conflicts probably weren't the bottleneck. In general, it's a lot better to reduce the instance of conflicts as here than is it to reduce the cost of conflicts. Regardless of how we deal with them -- whether via locking or via retry -- it'll always be better for transactions to, on average, access disjoint extents. @cyx1231st Can we update the unit tests to keep the super low values? We want the unit tests to do at least some journal rewriting. |
Making the journal longer does help in this case. Because the journal is longer, each rewritten extent required a larger number of mutations (proportional to the longer journal length) before it's rewritten. Thus, each rewrite represents a proportionately smaller share of overall work per IO. |
athanatos
left a comment
There was a problem hiding this comment.
LGTM except for keeping the old values for unit tests.
Yeah, I understand that, my point is that it may not help so much that we don't need to do anything else. According to my tests, increasing the journal size can reduce about half of the conflicts in the rbd use cases, but we still see a relatively high conflict rate. And increasing it further actually made things worse. I'll share my analysis once I confirm that the test results are correct. On the other hand, besides the journal trimming, space reclamation also gets invalidated 2~3 times per reclaim cycle before the available disk space runs out, and according to my analysis: https://gist.github.com/xxhdx1985126/1c49d0de2a8590aed5d62e611cbc63cd#duration-of-space-reclamation, we should be able to benefit a lot from avoiding those conflicts. And this configuration change doesn't seem to help space reclamation. So, my whole point is that we still need to implement some machinery to avoid invalidations. |
I think that's exactly what I meant, "few users would generate a workload that access the whole disk space with uniformal probability" |
Ah, right! |
Sure, I plan to implement this in this PR.
I'll also test this case myself, here is what I thought about the scenario:
|
|
More direct way to do it would be for fio to do random writes to a 1gb portion of a pre-populated 50gb image. |
I'm testing this case, but it seems that this triggers a drawback in the backref batch insert process that leads to reclaim transactions exceeding the 64MB(segment size) threshold. I'm trying to fix it, right now. |
bab6416 to
7749278
Compare
@athanatos Hi, sam, I wonder what you think about my comment above, am I right about that? Thanks. |
Done. |
Yes, this change will not affect that. Identifying precisely what impacts that conflict rate is probably the next step. |
|
Just merged the CBJournal PR, needs to be rebased. |
@cyx1231st @athanatos I think I have to admit that this pr works well in case of rbd, it turns out that I was measuring conflicts per journal trim cycle and saw that we still have about 6~8 conficts per trim cycle, which led me to the above conclusion. However, the avg trim cycles per second drops from 133.3250 to 1.6187, and the time it takes to fill the disk space is increased from about 880 seconds to about 1800 seconds. And conflicts on onode extents are also reduced dramatically. So if you are testing this pr just to see if it works well in cases of rbd, don't bother. I'm really sorry for causing these extra work. BTW, since prefilling data isn't available on my testbed, I'm showing the non-data-prefilled test result after both the lba and onode trees' depth reaches 3. |
|
@xxhdx1985126 No worries from my side at least! FWIW, I agree that we likely do have more work to do with conflicts :) |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
No worries @xxhdx1985126, I'll still need this workload to work on the generational GC. |
Will rebase after #46334 is merged. |
@xxhdx1985126 do you mean that the end performance becomes worse in your test result? |
Oh, no, I meant the gc performance is better, so the disk space runs out slower. |
… size Signed-off-by: Yingxin Cheng <[email protected]>
7749278 to
6a4f0e3
Compare
|
rebased |












In short, by increasing the journal size:
By decreasing the rewrite-dirty size (with pros and cons):
600s RADOS random write performance results
A. Original
B. Increase the number of journal segments
C. Then decrease rewrite-dirty size
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows