e4st-dev / E4ST.jl

Engineering, Economic, and Environmental Electricity Simulation Tool (E4ST)
GNU General Public License v3.0
7 stars 1 forks source link

JuMP Performance Improvement #298

Closed Ethan-Russell closed 3 months ago

github-actions[bot] commented 3 months ago
Benchmark result # Judge result # Benchmark Report for */home/runner/work/E4ST.jl/E4ST.jl* ## Job Properties * Time of benchmarks: - Target: 3 Jul 2024 - 17:47 - Baseline: 3 Jul 2024 - 17:49 * Package commits: - Target: 736370 - Baseline: 7d518a * Julia commits: - Target: 48d4fd - Baseline: 48d4fd * 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 :x:), while a ratio less than `1.0` denotes a possible improvement (marked with :white_check_mark:). 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 | |---------------------|------------------------------|------------------------------| | `["get_generator"]` | 1.06 (5%) :x: | 1.00 (1%) | | `["run_e4st"]` | 0.82 (5%) :white_check_mark: | 0.99 (1%) :white_check_mark: | | `["setup_model"]` | 0.46 (5%) :white_check_mark: | 0.65 (1%) :white_check_mark: | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `[]` ## Julia versioninfo ### Target ``` Julia Version 1.10.4 Commit 48d4fd48430 (2024-06-04 10:41 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.5.0-1022-azure #23~22.04.1-Ubuntu SMP Thu May 9 17:59:24 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 3244 MHz 1418 s 0 s 111 s 2644 s 0 s #2 3245 MHz 1529 s 0 s 116 s 2518 s 0 s #3 2836 MHz 1370 s 0 s 126 s 2668 s 0 s #4 3082 MHz 1347 s 0 s 110 s 2714 s 0 s Memory: 15.606491088867188 GB (13335.6484375 MB free) Uptime: 419.64 sec Load Avg: 1.2 1.17 0.59 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` ### Baseline ``` Julia Version 1.10.4 Commit 48d4fd48430 (2024-06-04 10:41 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.5.0-1022-azure #23~22.04.1-Ubuntu SMP Thu May 9 17:59:24 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 3222 MHz 1600 s 0 s 128 s 3877 s 0 s #2 3243 MHz 2177 s 0 s 136 s 3286 s 0 s #3 2445 MHz 1573 s 0 s 144 s 3880 s 0 s #4 2620 MHz 1735 s 0 s 126 s 3742 s 0 s Memory: 15.606491088867188 GB (13417.33984375 MB free) Uptime: 563.24 sec Load Avg: 1.07 1.11 0.66 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Target result # Benchmark Report for */home/runner/work/E4ST.jl/E4ST.jl* ## Job Properties * Time of benchmark: 3 Jul 2024 - 17:47 * Package commit: 736370 * Julia commit: 48d4fd * 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 | |---------------------|----------------:|-----------:|----------------:|------------:| | `["get_af"]` | 83.937 ns (5%) | | 32 bytes (1%) | 2 | | `["get_generator"]` | 43.751 ns (5%) | | 48 bytes (1%) | 1 | | `["get_plnom"]` | 92.303 ns (5%) | | 48 bytes (1%) | 3 | | `["read_data"]` | 30.819 ms (5%) | | 10.90 MiB (1%) | 338507 | | `["run_e4st"]` | 144.882 ms (5%) | | 106.83 MiB (1%) | 596700 | | `["setup_model"]` | 811.755 ms (5%) | 212.011 ms | 654.52 MiB (1%) | 8822586 | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `[]` ## Julia versioninfo ``` Julia Version 1.10.4 Commit 48d4fd48430 (2024-06-04 10:41 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.5.0-1022-azure #23~22.04.1-Ubuntu SMP Thu May 9 17:59:24 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 3244 MHz 1418 s 0 s 111 s 2644 s 0 s #2 3245 MHz 1529 s 0 s 116 s 2518 s 0 s #3 2836 MHz 1370 s 0 s 126 s 2668 s 0 s #4 3082 MHz 1347 s 0 s 110 s 2714 s 0 s Memory: 15.606491088867188 GB (13335.6484375 MB free) Uptime: 419.64 sec Load Avg: 1.2 1.17 0.59 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Baseline result # Benchmark Report for */home/runner/work/E4ST.jl/E4ST.jl* ## Job Properties * Time of benchmark: 3 Jul 2024 - 17:49 * Package commit: 7d518a * Julia commit: 48d4fd * 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 | |---------------------|----------------:|-----------:|-----------------:|------------:| | `["get_af"]` | 83.997 ns (5%) | | 32 bytes (1%) | 2 | | `["get_generator"]` | 41.197 ns (5%) | | 48 bytes (1%) | 1 | | `["get_plnom"]` | 91.070 ns (5%) | | 48 bytes (1%) | 3 | | `["read_data"]` | 31.760 ms (5%) | | 10.90 MiB (1%) | 338507 | | `["run_e4st"]` | 177.161 ms (5%) | 23.422 ms | 108.35 MiB (1%) | 619813 | | `["setup_model"]` | 1.783 s (5%) | 629.955 ms | 1007.92 MiB (1%) | 13989102 | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `[]` ## Julia versioninfo ``` Julia Version 1.10.4 Commit 48d4fd48430 (2024-06-04 10:41 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.5.0-1022-azure #23~22.04.1-Ubuntu SMP Thu May 9 17:59:24 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 3222 MHz 1600 s 0 s 128 s 3877 s 0 s #2 3243 MHz 2177 s 0 s 136 s 3286 s 0 s #3 2445 MHz 1573 s 0 s 144 s 3880 s 0 s #4 2620 MHz 1735 s 0 s 126 s 3742 s 0 s Memory: 15.606491088867188 GB (13417.33984375 MB free) Uptime: 563.24 sec Load Avg: 1.07 1.11 0.66 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Runtime information | Runtime Info | | |:--|:--| | BLAS #threads | 2 | | `BLAS.vendor()` | `lbt` | | `Sys.CPU_THREADS` | 4 | `lscpu` output: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: AuthenticAMD Model name: AMD EPYC 7763 64-Core Processor CPU family: 25 Model: 1 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 Stepping: 1 BogoMIPS: 4890.85 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm Virtualization: AMD-V Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 64 KiB (2 instances) L1i cache: 64 KiB (2 instances) L2 cache: 1 MiB (2 instances) L3 cache: 32 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode 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; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected | Cpu Property | Value | |:------------------ |:---------------------------------------------------------- | | Brand | AMD EPYC 7763 64-Core Processor | | Vendor | :AMD | | Architecture | :Unknown | | Model | Family: 0xaf, Model: 0x01, Stepping: 0x01, Type: 0x00 | | Cores | 16 physical cores, 16 logical cores (on executing CPU) | | | No Hyperthreading hardware capability detected | | Clock Frequencies | Not supported by CPU | | Data Cache | Level 1:3 : (32, 512, 32768) kbytes | | | 64 byte cache line size | | Address Size | 48 bits virtual, 48 bits physical | | SIMD | 256 bit = 32 byte max. SIMD vector size | | Time Stamp Counter | TSC is accessible via `rdtsc` | | | TSC runs at constant rate (invariant from clock frequency) | | Perf. Monitoring | Performance Monitoring Counters (PMC) are not supported | | Hypervisor | Yes, Microsoft |
Ethan-Russell commented 3 months ago

From the benchmark results above, looks like the runtime of setup_model was cut in half!

Ethan-Russell commented 3 months ago

Before

image

After

image

Went from 24 minutes to 2 minutes!!! (To be fair, the "After" run has a smaller generator table, but probably still a solid 8x speedup)