Skip to content

Conversation

@amadio
Copy link
Member

@amadio amadio commented Jul 6, 2017

This is a refactored version of part of PR #709. The figure attached below shows an example of the difference in wait time, as measured by VTune for parallel filling of a TTree with random numbers. The number of waits on LoadClassInfo() is reduced from 451 to just 8 (one wait per thread).

screenshot

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@root-project root-project deleted a comment from phsft-bot Jul 7, 2017
@amadio
Copy link
Member Author

amadio commented Jul 7, 2017

The attached image shows a summary of differences on KNL with 128 threads. Notice how the wait time is significantly reduced from 1485.7s to 1105s. There are also 2936 less waits than before. CPU time of all threads is reduced by ~50s. These are not hugely visible in real runtime, because we are limited by I/O to the disk, essentially, but it would be clearly visible if I/O ceases to be the main bottleneck. The two figures on the bottom show that the time during which the threads run is shorter after the changes introduced in this PR. For reference, the running time without using VTune is about 40s.

screenshot

screenshot

screenshot

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

return;
}
}
fClassInfo = gInterpreter->ClassInfo_Factory(givenInfo);
Copy link
Member

Choose a reason for hiding this comment

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

These two are the only lines about which we did not reach consensus during the PPP meeting today. The open question is whether we need to put them in a critical section or if it is enough to take the lock in LoadClassInfo.

@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on centos7/gcc49.
See console output.

}
}

R__LOCKGUARD(gInterpreterMutex);
Copy link
Member

Choose a reason for hiding this comment

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

Note that taking the lock inside TClass::Init is (should be) redundant as Init must only be called from the constructors and they all (should) take the lock before calling Init.

Copy link
Member

Choose a reason for hiding this comment

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

except for this minor comment. the PR looks good.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I will push an updated version. Thanks for reviewing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, I removed that lock. I will wait for Jenkins to run and then merge.

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on mac1012/native.
See console output.

Failing tests:

The member fCanLoadClassInfo is used to check if the class info
is available and/or is loaded. If it is already available at
initialization, then there is no reason to call LoadClassInfo().
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@amadio amadio merged commit 0212be7 into root-project:master Jul 24, 2017
@amadio
Copy link
Member Author

amadio commented Jul 24, 2017

Merged. Clang-format wanted to put my if on a single long line, so I ignored that and fixed the rest.

@amadio amadio deleted the root-io branch July 24, 2017 17:29
@phsft-bot
Copy link

Build failed on ubuntu14/native.
See console output.

@phsft-bot
Copy link

Build failed on mac1012/native.
See console output.

Failing tests:

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.

4 participants