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

Shortcut for saving small cubes #210

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Shortcut for saving small cubes #210

merged 1 commit into from
Jan 4, 2023

Conversation

meggart
Copy link
Member

@meggart meggart commented Jan 4, 2023

There was a performance bug when saving cubes that were much smaller than available memory where the cp[y buffer size could not be optimized. This PR adds a workaround for this case.

@meggart
Copy link
Member Author

meggart commented Jan 4, 2023

A reproducer is

using YAXArrays, Zarr

data = rand(Float32,1440,720)
ar = YAXArray([RangeAxis("longitude",-179.875:0.25:179.875), RangeAxis("latitude",89.875:-0.25:-89.875)],data)

savecube(ar, "./output.zarr",overwrite=true)

which takes embarassing 30 minutes without this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

Benchmark result

Judge result

Benchmark Report for /home/runner/work/YAXArrays.jl/YAXArrays.jl

Job Properties

  • Time of benchmarks:
    • Target: 4 Jan 2023 - 14:29
    • Baseline: 4 Jan 2023 - 14:29
  • Package commits:
    • Target: 178283
    • Baseline: 60991f
  • Julia commits:
    • Target: 00177e
    • Baseline: 00177e
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["mapslices", "small"] 0.01 (5%) ✅ 0.16 (1%) ✅

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["mapslices"]

Julia versioninfo

Target

Julia Version 1.8.4
Commit 00177ebc4fc (2022-12-23 21:32 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.15.0-1024-azure #30-Ubuntu SMP Wed Nov 16 23:37:59 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1160 s          0 s        192 s        450 s          0 s
       #2  2793 MHz        752 s          0 s        154 s        893 s          0 s
  Memory: 6.781219482421875 GB (4701.3515625 MB free)
  Uptime: 185.77 sec
  Load Avg:  1.4  0.81  0.33
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Baseline

Julia Version 1.8.4
Commit 00177ebc4fc (2022-12-23 21:32 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.15.0-1024-azure #30-Ubuntu SMP Wed Nov 16 23:37:59 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1484 s          0 s        204 s        495 s          0 s
       #2  2793 MHz        799 s          0 s        158 s       1224 s          0 s
  Memory: 6.781219482421875 GB (4752.58203125 MB free)
  Uptime: 223.91 sec
  Load Avg:  1.22  0.83  0.36
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Target result

Benchmark Report for /home/runner/work/YAXArrays.jl/YAXArrays.jl

Job Properties

  • Time of benchmark: 4 Jan 2023 - 14:29
  • Package commit: 178283
  • Julia commit: 00177e
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["mapslices", "small"] 148.596 ms (5%) 3.056 ms 326.03 MiB (1%) 91534

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["mapslices"]

Julia versioninfo

Julia Version 1.8.4
Commit 00177ebc4fc (2022-12-23 21:32 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.15.0-1024-azure #30-Ubuntu SMP Wed Nov 16 23:37:59 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1160 s          0 s        192 s        450 s          0 s
       #2  2793 MHz        752 s          0 s        154 s        893 s          0 s
  Memory: 6.781219482421875 GB (4701.3515625 MB free)
  Uptime: 185.77 sec
  Load Avg:  1.4  0.81  0.33
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Baseline result

Benchmark Report for /home/runner/work/YAXArrays.jl/YAXArrays.jl

Job Properties

  • Time of benchmark: 4 Jan 2023 - 14:29
  • Package commit: 60991f
  • Julia commit: 00177e
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["mapslices", "small"] 11.454 s (5%) 486.035 ms 1.96 GiB (1%) 31240450

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["mapslices"]

Julia versioninfo

Julia Version 1.8.4
Commit 00177ebc4fc (2022-12-23 21:32 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.15.0-1024-azure #30-Ubuntu SMP Wed Nov 16 23:37:59 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1484 s          0 s        204 s        495 s          0 s
       #2  2793 MHz        799 s          0 s        158 s       1224 s          0 s
  Memory: 6.781219482421875 GB (4752.58203125 MB free)
  Uptime: 223.91 sec
  Load Avg:  1.22  0.83  0.36
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Runtime information

Runtime Info
BLAS #threads 1
BLAS.vendor() openblas64
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          2
On-line CPU(s) list:             0,1
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
CPU family:                      6
Model:                           106
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
Stepping:                        6
BogoMIPS:                        5586.87
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       96 KiB (2 instances)
L1i cache:                       64 KiB (2 instances)
L2 cache:                        2.5 MiB (2 instances)
L3 cache:                        48 MiB (1 instance)
NUMA node(s):                    1
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Cpu Property Value
Brand Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
Vendor :Intel
Architecture :UnknownIntel
Model Family: 0x06, Model: 0x6a, Stepping: 0x06, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (48, 1280, 49152) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 512 bit = 64 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@coveralls
Copy link

coveralls commented Jan 4, 2023

Pull Request Test Coverage Report for Build 3838845482

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.09%) to 75.071%

Files with Coverage Reduction New Missed Lines %
src/Cubes/Rechunker.jl 2 88.46%
Totals Coverage Status
Change from base Build 3677167434: -0.09%
Covered Lines: 1322
Relevant Lines: 1761

💛 - Coveralls

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Base: 75.23% // Head: 75.15% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (e9a405b) compared to base (60991f2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
- Coverage   75.23%   75.15%   -0.09%     
==========================================
  Files          12       12              
  Lines        1817     1819       +2     
==========================================
  Hits         1367     1367              
- Misses        450      452       +2     
Impacted Files Coverage Δ
src/Cubes/Rechunker.jl 87.03% <100.00%> (-3.35%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@meggart meggart merged commit 4442217 into master Jan 4, 2023
@lazarusA
Copy link
Collaborator

lazarusA commented Jan 4, 2023

@meggart @felixcremer tag new release with this change?

@meggart meggart deleted the fg/savingsmall branch January 5, 2023 08:14
@coveralls
Copy link

coveralls commented Nov 14, 2024

Pull Request Test Coverage Report for Build 3838845482

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 18 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.6%) to 75.734%

Files with Coverage Reduction New Missed Lines %
src/Cubes/Cubes.jl 1 93.12%
src/Cubes/TransformedCubes.jl 1 77.78%
src/DAT/dciterators.jl 1 82.61%
src/DAT/tablestats.jl 1 44.78%
src/Cubes/Rechunker.jl 3 87.04%
src/DatasetAPI/Datasets.jl 5 75.33%
src/DAT/DAT.jl 6 74.65%
Totals Coverage Status
Change from base Build 3677167434: 0.6%
Covered Lines: 1367
Relevant Lines: 1805

💛 - Coveralls

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.

3 participants