Skip to content

Conversation

@mpilman
Copy link
Contributor

@mpilman mpilman commented Mar 4, 2019

The intention here is to let storage servers throttle incoming reads if
durability lag goes up.

Ratekeeper will pick this up and go down if a whole team sees high NDV.

This is not intended for merging yet, but only for code review and testing.

@ajbeamon
Copy link
Contributor

ajbeamon commented Mar 4, 2019

There currently exists an alternate mechanism to limit reads to particular storage servers when the queues get large. I think in the replies to various requests, it signals to the client some penalty and then load balancing responds by preferring other storage servers. For the case of local controlling, it may be sufficient for that mechanism to be used instead rather than adding a new one.

It still may make sense for ratekeeper to control globally when multiple team members are experiencing sufficient lag.

@mpilman mpilman force-pushed the features/local-rk branch from ea2e9cf to 7699d44 Compare March 5, 2019 01:41
@mpilman
Copy link
Contributor Author

mpilman commented Mar 5, 2019

I think in the replies to various requests, it signals to the client some penalty and then load balancing responds by preferring other storage servers.

This is pretty cool, I wasn't aware of this mechanism. We are currently playing with several mechanisms to figure out what works best. So we'll try something which uses this later.

Arena lastArena;
double cpuUsage;
double diskUsage;
double currentRate = 1.0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the name currentRate, I would expect this to be an actual rate and not the probability of a request being accepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, I don't find it super straightforward from that wikipedia article what your response actually means. I took the initial comment as saying that a different name could more clearly describe what the value was since it doesn't seem to be a straightforward rate. Perhaps the name is defensible, though it's not clear to me why.

@alexmiller-apple
Copy link
Contributor

@fdb-build, ok to test

@mpilman
Copy link
Contributor Author

mpilman commented Mar 6, 2019

I don't think this should be tested yet. This is very much in the prototyping phase and is known to not work properly

@mpilman mpilman force-pushed the features/local-rk branch 4 times, most recently from f73d85f to e08fc58 Compare March 14, 2019 04:28

double getPenalty() {
return std::max(1.0, (queueSize() - (SERVER_KNOBS->TARGET_BYTES_PER_STORAGE_SERVER - 2.0*SERVER_KNOBS->SPRING_BYTES_STORAGE_SERVER)) / SERVER_KNOBS->SPRING_BYTES_STORAGE_SERVER);
return std::max(std::max(1.0, (queueSize() - (SERVER_KNOBS->TARGET_BYTES_PER_STORAGE_SERVER -
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be

Suggested change
return std::max(std::max(1.0, (queueSize() - (SERVER_KNOBS->TARGET_BYTES_PER_STORAGE_SERVER -
return std::max(std::min(1.0, (queueSize() - (SERVER_KNOBS->TARGET_BYTES_PER_STORAGE_SERVER -

@mpilman mpilman force-pushed the features/local-rk branch from ff47192 to 91df1bd Compare April 2, 2019 21:57
@mpilman mpilman force-pushed the features/local-rk branch from b2abb40 to b286102 Compare April 8, 2019 18:06
@mpilman
Copy link
Contributor Author

mpilman commented Apr 22, 2019

This work is continued in #1477 - so closing this one

@mpilman mpilman closed this Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants