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

Need optimisation for chunk dimensions #55

Open
texadactyl opened this issue Feb 2, 2022 · 4 comments
Open

Need optimisation for chunk dimensions #55

texadactyl opened this issue Feb 2, 2022 · 4 comments
Assignees

Comments

@texadactyl
Copy link
Contributor

The current chunk strategy is not working optimally for turbo_seti.

@texadactyl texadactyl self-assigned this Feb 2, 2022
@texadactyl
Copy link
Contributor Author

Today, this is the blimpy strategy one can see in waterfall.py, as used by fil2h5:
image

@texadactyl
Copy link
Contributor Author

texadactyl commented Feb 2, 2022

Initially, rawspec v3 has been using uniformly: (1, 1, number_of_fine_channels).
This causes degradation in readers such as turbo_seti.

This was amended to be (Nds, 1, Nfpc)
where Ndsis the number of spectra per dump and Nfpc is the number of fine channels per coarse channel.

@texadactyl
Copy link
Contributor Author

texadactyl commented Feb 4, 2022

@david-macmahon from Seti BL slack:

Change the chunk size logic such that

  • The frequency dimension = min(nfpc, 65536)
  • The time dimension is max(Nds, 16)

Only concern is that for nfpc=2^20 and Nc=64, we will have 1024 "active" chunks for the high frequency resolution product. That might not play well with the chunk cache, so performance testing this idea would be critical. I think it would make the read side (E.g. turbo_seti) very happy.


Agreed. Much better, IMO. Getting started on work toewards tag v3.1.2. The only affected module is fbh5_open.c.

cc: @lacker @mattlebofsky

@texadactyl
Copy link
Contributor Author

texadactyl commented Feb 8, 2022

fbh5_open.c state

Control chunking with
int USE_BLIMPY = 0; // 1 : use blimpy's algorithm; 0 : don't do that

Control caching with
int CACHING_TYPE = 1; // 0 : no caching ; 1 : computed caching specifications; 2 : default caching

chunking logic in fbh5_open.c:

     cdims[0] = Nd;                         // number of spectra per dump
     cdims[1] = 1;
     cdims[2] = p_fb_hdr->nfpc;     // number of fine channels per coarse channel

computed caching in force:

    fcache_nslots = (cdims[0] * cdims[2]) + 1;
    fcache_nbytes = (Nd * p_fbh5_ctx->tint_size) + 1;   // tint_size byte size of one spectra

texadactyl pushed a commit that referenced this issue Feb 8, 2022
texadactyl pushed a commit that referenced this issue Feb 10, 2022
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

No branches or pull requests

1 participant