-
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-31463 Roxie should use plane setting for read block size #18429
HPCC-31463 Roxie should use plane setting for read block size #18429
Conversation
Signed-off-by: Richard Chapman <[email protected]>
I struggled to find a way to test this - plane configuration is a bit of a black art. |
@@ -1059,9 +1065,12 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress | |||
const char *kind = fdesc.queryKind(); | |||
if (kind && streq(kind, "key")) | |||
isKey = true; | |||
StringBuffer planeName; | |||
fdesc.getClusterLabel(pdesc->copyClusterNum(0), planeName); |
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.
I'm not sure if this is the right call to get the plane name that this file lives on?
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 good to do this way.
current.setown(f->open(IFOread)); | ||
if (current && blockedIOsize) |
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.
future: we should probably also use blockedIOsize for compressed files (if significantly above the compressed block size)
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.
@richardkchapman - looks good. Should this target 9.6?
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.
One comment.
Also, I don't think this provides any way to configure a bare-metal system. One solution would be to have a roxie configuration default. That would provide a simple way of experimenting with different values to explore the effects.
@@ -1059,9 +1065,12 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress | |||
const char *kind = fdesc.queryKind(); | |||
if (kind && streq(kind, "key")) | |||
isKey = true; | |||
StringBuffer planeName; | |||
fdesc.getClusterLabel(pdesc->copyClusterNum(0), planeName); | |||
blockedSize = getBlockedFileIOSize(planeName); |
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.
This needs to use a different variable/property of the storage plane. It is likely that we want to use 1MB when reading an index sequentially, but only 32/64K when reading it randomly.
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.
hm, ok, perhaps pass a accessmode type flag to getBlockedFileIOSize, with it determining (via new prop. if available)
current.setown(f->open(IFOread)); | ||
if (current && blockedIOsize) | ||
current.setown(createBlockedIO(current.getClear(), blockedIOsize)); |
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.
I've just realised... this class is not thread-safe, so can't be used for index shared-random access.
I'm not sure what we do about that because we want to allow concurrent access - so a critical section would not be a good idea.
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.
the blocked io class isn't thread safe, but isn't jhtree when it uses this IO, guaranteeing that it only loads from it (from CDiskKeyIndex::loadNode), in a mutex protected thread?
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.
ignore - can't delete this message
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.
Looks ok to me, but I am not too familiar with possible subtle details.
Why does CBlockedFileIO->read() not read into data, but into a MemoryBuffer and then copies ?
Closing - functionality was merged with #18672 |
Type of change:
Checklist:
Smoketest:
Testing: