-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-32250 Track PeakTempSize for all activities that use lookahead #18895
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32250 Jirabot Action Result: |
Signed-off-by: Shamser Ahmed <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamser - please see comments.
I do wonder whether we shouldn't just add spilling stats to the base activity stats.
The downside, mergeStats will walk over stats in the mapping, and query them, in activities that never used them, unnecessarily.
The upside, cleaner code, future changes won't have to keep these common attributes in sync.
@ghalliday - what's your thoughts? is the overhead of cycling through a few unused stat. kinds an issue. NB: in general there will be many stats that are are used I suspect. We could also think about optimizing mergeStats/tracking the stats that have been used..
@@ -34,7 +34,7 @@ class CChooseSetsActivityMaster : public CMasterActivity | |||
CActivityBase *createChooseSetsActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be other way around, i.e. spillingActivityStatistics should be on the line below.
The local/grouped version (LocalChooseSetsActivity) does not use a lookahead, the global one does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be simpler for all variants to use spilling stats.
@@ -34,7 +34,7 @@ class CountProjectActivityMaster : public CMasterActivity | |||
CActivityBase *createCountProjectActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per previous comment, the global one uses a lookahead, not the local/grouped version
@@ -37,7 +37,7 @@ class CEnthActivityMaster : public CMasterActivity | |||
CActivityBase *createEnthActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per last comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fact - both local and global Enth may use a lookahead, but I don't think localenth should - I will open a separate JIRA to change it - for now it is better to mirror how it's implemented and ensure spillingActivityStatistics used for both (as it is in worker impl.)
@@ -89,7 +89,7 @@ CriticalSection CFirstNActivityMaster::singlefirstnterm; | |||
CActivityBase *createFirstNActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per previous comments. The local version doesn't use a lookahead. The global does.
@@ -34,7 +34,7 @@ class CIterateActivityMaster : public CMasterActivity | |||
CActivityBase *createIterateActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per previous comments. The local version doesn't use a lookahead. The global does.
@@ -35,7 +35,7 @@ class CSelectNthActivityMaster : public CMasterActivity | |||
CActivityBase *createSelectNthActivityMaster(CMasterGraphElement *container) | |||
{ | |||
if (container->queryLocalOrGrouped()) | |||
return new CMasterActivity(container); | |||
return new CMasterActivity(container, spillingActivityStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per previous comments. The local version doesn't use a lookahead. The global does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakesmith I agree with your comments.
@@ -30,7 +30,7 @@ class BaseChooseSetsActivity : public CSlaveActivity | |||
unsigned *tallies; | |||
|
|||
public: | |||
BaseChooseSetsActivity(CGraphElementBase *_container) : CSlaveActivity(_container) | |||
BaseChooseSetsActivity(CGraphElementBase *_container, const StatisticsMapping & _mapping = basicActivityStatistics) : CSlaveActivity(_container, _mapping) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearer/safer to not have a default parameter so it is easy to check the correct mapping is being used for all variants.
@@ -35,7 +35,7 @@ class CFirstNSlaveBase : public CSlaveActivity | |||
IHThorFirstNArg *helper; | |||
|
|||
public: | |||
CFirstNSlaveBase(CGraphElementBase *_container) : CSlaveActivity(_container) | |||
CFirstNSlaveBase(CGraphElementBase *_container, const StatisticsMapping & _mapping = basicActivityStatistics) : CSlaveActivity(_container, _mapping) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment to above about not using a default parameter
@@ -79,15 +79,15 @@ const StatisticsMapping basicActivityStatistics({StTimeTotalExecute, StTimeLocal | |||
const StatisticsMapping groupActivityStatistics({StNumGroups, StNumGroupMax}, basicActivityStatistics); | |||
const StatisticsMapping indexReadFileStatistics({}, diskReadRemoteStatistics, jhtreeCacheStatistics); | |||
const StatisticsMapping indexReadActivityStatistics({StNumRowsProcessed}, indexReadFileStatistics, basicActivityStatistics); | |||
const StatisticsMapping indexWriteActivityStatistics({StPerReplicated, StNumLeafCacheAdds, StNumNodeCacheAdds, StNumBlobCacheAdds }, basicActivityStatistics, diskWriteRemoteStatistics); | |||
const StatisticsMapping indexWriteActivityStatistics({StPerReplicated, StNumLeafCacheAdds, StNumNodeCacheAdds, StNumBlobCacheAdds }, spillingActivityStatistics, basicActivityStatistics, diskWriteRemoteStatistics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spillingActivityStatistics -> spillStatistics
Replaced by #18920 |
Type of change:
Checklist:
Smoketest:
Testing: