You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/05 16:39:12 UTC
[GitHub] [ozone] sodonnel opened a new pull request, #3275: HDDS-6554. Have the datanode heartbeat include queue command counts
sodonnel opened a new pull request, #3275:
URL: https://github.com/apache/ozone/pull/3275
## What changes were proposed in this pull request?
To allow SCM to make better decisions about scheduling commands on datanodes, the datanodes should report their current command queue size in the heartbeat. This change adds a section to the heartbeat protobuf message to allow the queued command count for each command type to be reported in each heartbeat.
There will be a count reported for each registered command, with a zero count if the queue is empty.
A follow up change will be needed to use this information on SCM. With this Jira in place, the data will be sent but never used on SCM.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6554
## How was this patch tested?
Some new unit tests and existing tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] symious commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
symious commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1090032489
@sodonnel Thanks for the explaination.
LGTM for the patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] umamaheswararao commented on a diff in pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
umamaheswararao commented on code in PR #3275:
URL: https://github.com/apache/ozone/pull/3275#discussion_r846369507
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteContainerCommandHandler.java:
##########
@@ -82,6 +82,11 @@ public void handle(final SCMCommand command,
});
}
+ @Override
+ public int getQueuedCount() {
Review Comment:
I am ok with separate JIRA. Just approved the current version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] guihecheng commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
guihecheng commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1090315067
@sodonnel Sure, thanks for the explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sodonnel commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
sodonnel commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1089935238
@symious After we get the information in SCM, we can make changes to use it. Light weight commands are not a concern at the moment. ReplicateContainer, on the other hand is a problem, and it is the one we hope to address. However it makes sense to report the stats for all commands, rather than have a special case for replication commands only.
We plan to use the queue count for replication as we develop the EC replication solution, and hopefully address Ratis container replication too, so the the commands are queued on SCM rather than a very large queue on each datanode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] guihecheng commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
guihecheng commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1089994119
Hi @sodonnel the idea and the overall patch LGTM.
I think here the queue count is a measure of the current "load" of each single DN, right? Then SCM collects them, and could implement some kind of throttling or scheduling policies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sodonnel commented on a diff in pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
sodonnel commented on code in PR #3275:
URL: https://github.com/apache/ozone/pull/3275#discussion_r846359076
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteContainerCommandHandler.java:
##########
@@ -82,6 +82,11 @@ public void handle(final SCMCommand command,
});
}
+ @Override
+ public int getQueuedCount() {
Review Comment:
You could be right. For replicate container command, it uses a slightly different implementation, so it does return the count of running + queued. However for others that use executors, the true queued work will be the queue_size + currently executing. However it will always be changing and will be out-of-date almost as soon as it arrives at SCM. I guess the queue size is a good approximation, but perhaps we should open another Jira to investigate making this more accurate in the future. What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sodonnel merged pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
sodonnel merged PR #3275:
URL: https://github.com/apache/ozone/pull/3275
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sodonnel commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
sodonnel commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1090126920
@guihecheng It does not really represent load - its just the count of commands queued. When SCM knows the number of commands queued, it can avoid sending more replication work to DNs which already have enough in their queue. The load on the DN could be causing the commands to build up, or maybe it is having network or disk slowness or something. SCM will first need changed to store these counts send on the heartbeat. Then we can start to consider changes to areas that send commands, eg replication.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] symious commented on pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
symious commented on PR #3275:
URL: https://github.com/apache/ozone/pull/3275#issuecomment-1089698130
@sodonnel Thanks for the patch.
Can I ask how will SCM schedule the command based on the queue count?
Say we have a datanode with high queue number of ClosePipelineCommand, seems SCM still will send another command if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] umamaheswararao commented on a diff in pull request #3275: HDDS-6554. Have the datanode heartbeat include queued command counts
Posted by GitBox <gi...@apache.org>.
umamaheswararao commented on code in PR #3275:
URL: https://github.com/apache/ozone/pull/3275#discussion_r846353239
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteContainerCommandHandler.java:
##########
@@ -82,6 +82,11 @@ public void handle(final SCMCommand command,
});
}
+ @Override
+ public int getQueuedCount() {
Review Comment:
Since we are using directly this queue from threadpool, there is a chance one more task in progress running task right? For now it may be ok, I am just wondering we need to maintain our own counter to track all tasks including currently running task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org