Speed up SSVM startup time by postponing checks#4641
Speed up SSVM startup time by postponing checks#4641ravening wants to merge 1 commit intoapache:mainfrom
Conversation
Currently SSVM takes long time to startup. Reduce the startup time by moving volume/template check to post connect TimerTask to speed up ssvm startup
| private void postConnect(Host agent, StartupCommand cmd) throws ConnectionException { | ||
| if (cmd instanceof StartupSecondaryStorageCommand) { |
There was a problem hiding this comment.
this is only ever called with a StartupSecondaryStorageCommand so can we change the parameter type and skip the class check?
| if (_postConnectTask != null) | ||
| _postConnectTask.cancel(); |
There was a problem hiding this comment.
is this only ever working on one dowload job? it seems we are canceling the download check for someone else here.
|
I think it may cause some issue if we don't do this, esp in env with very large no. of templates, volumes, snapshots - pl discuss on dev/users@ @ravening |
|
Ping @ravening |
|
@weizhouapache you have any feedback on this pr? |
|
Pl discuss on dev@, in my opinion this should be closed as postponing check isn't something we would want. The tradeoff of speedup vs check needs to be discussed. |
@ravening |
|
@weizhouapache I'm just being risk-averse :) I see that checks are only postponed - but I worry if not doing checks at the time of initial connection causes any failures? For example, you allow the agent to connect and it starts doing some storage related operation, and later the post-connect thread/check runs and finds out we shouldn't have connected, or it fails but since the agent is connected, agent continues to process new commands? (a case can be the template/volume scanning logic times out, but the connect is still connected so agent gets some new operation say re-download template from a URL which is wrong/404 etc and it ends up overwriting existing files?) |
@rhtyd these are very good questions. |
|
closing it after discussion |
Description
Currently SSVM takes long time to startup.
Reduce the startup time by moving volume/template
check to post connect TimerTask to speed up ssvm startup
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?