Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAuto-tweak checkpoint frequency based on the observed storage device performance profile #1922
Comments
beorn7
closed this
Aug 25, 2016
beorn7
reopened this
Aug 25, 2016
This comment has been minimized.
This comment has been minimized.
|
sorry, touchpads auto-clicks... |
This comment has been minimized.
This comment has been minimized.
|
es, that's the way once you have arrived at your "real" device. However, on modern servers, there might be a whole stack of devices on top of each other. And that's all just one possible setup. We didn't even have overlay FSs or containers in the game. |
This comment has been minimized.
This comment has been minimized.
|
Hmm, meh. In my limited test across a few VMs, I found all of them to expose this. I do wonder if this is a case of "if we can detect it easily, we should" and ignoring the rest for now. It might be worthwhile to give the user information about not being able to detect this, but that would be a second step. |
This comment has been minimized.
This comment has been minimized.
|
This issue would profit from a description why we want this. Do we have any proposals for handling spinning discs differently, that address existing performance issues and can be implemented with reasonable effort? |
This comment has been minimized.
This comment has been minimized.
|
Yeah, context is missing. That was all stemming from the default value of the |
This comment has been minimized.
This comment has been minimized.
|
Sorry, yes.
Thanks for adding context (and being slightly quicker). This was more of a
mental note during Björn's talk and I failed to update.
Richard
Sent by mobile; excuse my brevity.
|
This comment has been minimized.
This comment has been minimized.
flaviusanton
commented
Sep 14, 2016
|
Disclaimer: Sorry if I am out of context, I found out what Prometheus is about 30mins ago. Thought it's interesting, so I took a glance over the open issues. It seems like this issue is an XY problem. You don't really care if the underlying hardware is a pure old HDD or an SSD, you just care if it can perform the checkpoint under 1 minute, which, in my understanding, means lots of IOPS and/or throughput (I guess it's the former). If you really want to auto determine the right value for My 2¢. |
This comment has been minimized.
This comment has been minimized.
|
A quick benchmark would be defeated by a writeback cache, and a benchmark of sufficient length would take too long. |
This comment has been minimized.
This comment has been minimized.
|
In general, the idea might work. But let's not do a separate benchmark but observe the real-life behavior. The Prometheus could for a while try to run series maintenance as fast as possible and measure the timing. (High sustained maintenance frequency hints towards a device with fast seeks.) Same, it could evaluate the time needed for checkpointing (which we are measuring anyway, and here a fast checkpoint hints towards a device with fast linear writes). |
beorn7
changed the title
Detect if Prometheus is running on spinning disk or SSD.
Auto-tweak checkpoint frequency based on the observed storage device performance profile
Sep 14, 2016
beorn7
self-assigned this
Sep 14, 2016
This comment has been minimized.
This comment has been minimized.
|
Changed title accordingly. This would be in a similar area as the #455 : Essentially relieving the user from tuning many flags depending on the given situation. |
This comment has been minimized.
This comment has been minimized.
|
I wonder if detecting the storage type is better done in configuration On Wed, 14 Sep 2016, 10:21 Björn Rabenstein, notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
Yes, that's the currently recommended way. The whole point of this issue is that people want to have fewer command line flags to understand and tweak. The result might very well be that auto-tuning turns out to be harmful and we'll just stick with the current way. But it's at least worth a thought. |
This comment has been minimized.
This comment has been minimized.
|
Another aspect here is to checkpoint less often if the checkpoint is already quite large. Another vicious cycle looms here: There are too many chunks waiting for persistence already. Which causes a large checkpoint. Which causes large checkpointing times. Which takes a lot of disk bandwidth away from persisting chunks. Which increases the number of chunks waiting for persistence even more. Which makes the checkpoint even larger. I have seen SSDs locking completely up for minutes after a checkpoint. They really don't like the large sustained write of a checkpoint in combination with the many smaller random writes to series files. Thing become really bad if the SSD is more than 70% full. (Which is why some people overprovision SSDs anyway, i.e. they only use 70% of the available space for the filesystem and leave the rest for the device as breathing room.) We already prevent early checkpoints (because of the dirty series count) in rushed mode, but we probably need to extend that heuristics, like scale up checkpointing intervals by persistence urgency, or wait at least as long between checkpoints as the last checkpoint took. |
This comment has been minimized.
This comment has been minimized.
That sounds nice and simple to me. I'd avoid putting too much work in here, as the new storage will obsolete it. |
This comment has been minimized.
This comment has been minimized.
|
I'll put an easy fix in place to always wait at least as long after each checkpoint as the checkpoint took. As @brian-brazil said, in v2.0, there won't be checkpoints anymore. |
beorn7
referenced this issue
Apr 6, 2017
Merged
storage: Several optimizations of checkpointing #2591
This comment has been minimized.
This comment has been minimized.
|
Closing as #2591 is as much as we will do about checkpointing before everybody uses v2.0... |
beorn7
closed this
Apr 7, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
RichiH commentedAug 25, 2016
While AWS etc might hide this information, the common case on Linux 2.6.29 and beyond is:
cat /sys/block/sda/queue/rotational@beorn7