Skip to content
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

Making the allocation part of read_tiles single threaded. #2753

Merged
merged 2 commits into from Dec 23, 2021

Conversation

KiterLuc
Copy link
Contributor

@KiterLuc KiterLuc commented Dec 20, 2021

This change reverts the first part of read_tiles to be single threaded. As it is mostly doing memory allocations, it's better to keep it single threaded.

Also including a bug fix when checking the tile allocation size and another to prevent reloading query condition tiles in the sparse unordered with duplicates reader.


TYPE: IMPROVEMENT
DESC: Making the allocation part of read_tiles single threaded.

@shortcut-integration
Copy link

@KiterLuc KiterLuc force-pushed the lr/read-unfilter-parallel/ch12965 branch from 47bc9f7 to 92533bc Compare December 20, 2021 16:53
Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb left a comment

Choose a reason for hiding this comment

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

The modifications to the Tile class have the same problem that the Stats class already has: mixing different lifespan concerns within the same class.

 mutex/cv use: *****************------------------------
tile data use: ---------------**************************

One of the effects is simply memory consumption. After tiles are loaded, the mutex/cv remains in memory, not doing anything.

What's really here is a factory class with synchronized construction of Tile objects. It likely ought to appear as a separate class. Instances of a separate tile factory could also be reused through a resource pool, yield a modest fixed memory overhead and avoid most of the construction costs of factories.

@KiterLuc KiterLuc force-pushed the lr/read-unfilter-parallel/ch12965 branch 4 times, most recently from 1bf33f0 to c972f96 Compare December 20, 2021 20:42
@KiterLuc KiterLuc changed the title Read/unfilter tiles: start unfiltering as soon as tiles are ready. Making the allocation part of read_tiles single threaded. Dec 20, 2021
@KiterLuc KiterLuc force-pushed the lr/read-unfilter-parallel/ch12965 branch 4 times, most recently from 0ff1051 to 0b77fba Compare December 21, 2021 20:16
This change allows unfiltering to start as soon as tiles are loaded by
VFS. By including a condition variable for each tiles, VFS can signal
once it loads an initial batch of tiles. This also adds the
vfs.max_batch_read_size setting to specify the maximum size for a batch.

---
TYPE: IMPROVEMENT
DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready.
@KiterLuc KiterLuc force-pushed the lr/read-unfilter-parallel/ch12965 branch 7 times, most recently from ae9d7de to 40224a6 Compare December 23, 2021 00:51
@KiterLuc KiterLuc force-pushed the lr/read-unfilter-parallel/ch12965 branch from 40224a6 to 5433574 Compare December 23, 2021 01:24
@KiterLuc KiterLuc merged commit 070fed0 into dev Dec 23, 2021
@KiterLuc KiterLuc deleted the lr/read-unfilter-parallel/ch12965 branch December 23, 2021 03:24
github-actions bot pushed a commit that referenced this pull request Dec 23, 2021
* Read/unfilter tiles: start unfiltering as soon as tiles are ready.

This change allows unfiltering to start as soon as tiles are loaded by
VFS. By including a condition variable for each tiles, VFS can signal
once it loads an initial batch of tiles. This also adds the
vfs.max_batch_read_size setting to specify the maximum size for a batch.

---
TYPE: IMPROVEMENT
DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready.

* Scoping back the change to only a few fixes and making tile generation
single threaded.
Shelnutt2 pushed a commit that referenced this pull request Dec 27, 2021
)

* Read/unfilter tiles: start unfiltering as soon as tiles are ready.

This change allows unfiltering to start as soon as tiles are loaded by
VFS. By including a condition variable for each tiles, VFS can signal
once it loads an initial batch of tiles. This also adds the
vfs.max_batch_read_size setting to specify the maximum size for a batch.

---
TYPE: IMPROVEMENT
DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready.

* Scoping back the change to only a few fixes and making tile generation
single threaded.

Co-authored-by: KiterLuc <67824247+KiterLuc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants