Skip to content

Added a TaskSetManager unit test. - #1024

Closed
kayousterhout wants to merge 1 commit into
apache:masterfrom
kayousterhout:scheduler_unit_test
Closed

kayousterhout wants to merge 1 commit into
apache:masterfrom
kayousterhout:scheduler_unit_test

Conversation

@kayousterhout

Copy link
Copy Markdown
Contributor

This test ensures that when there are no
alive executors that satisfy a particular locality level,
the TaskSetManager doesn't ever use that as the maximum
allowed locality level (this optimization ensures that a
job doesn't wait extra time in an attempt to satisfy
a scheduling locality level that is impossible).

@mateiz and @lirui-intel this unit test illustrates an issue
with #892 (it fails with that patch).

This test ensures that (as an optimization), when there are no
alive executors that satisfy a particular locality level,
the TaskSetManager doesn't ever use that as the maximum
allowed locality level (this optimization ensures that a
job doesn't wait extra time in an attempt to satisfy
a scheduling locality level that is impossible).
@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished.

@AmplabJenkins

Copy link
Copy Markdown

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15570/

@kayousterhout

Copy link
Copy Markdown
Contributor Author

Jenkins, retest this please

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@mateiz

mateiz commented Jun 9, 2014

Copy link
Copy Markdown
Contributor

Thanks for adding this, Kay. Please merge it assuming it passes Jenkins.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. All automated tests passed.

@AmplabJenkins

Copy link
Copy Markdown

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15572/

@asfgit asfgit closed this in 6cf335d Jun 9, 2014
@kayousterhout

Copy link
Copy Markdown
Contributor Author

I've merged this into master.

@kayousterhout
kayousterhout deleted the scheduler_unit_test branch June 9, 2014 20:15
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
This test ensures that when there are no
alive executors that satisfy a particular locality level,
the TaskSetManager doesn't ever use that as the maximum
allowed locality level (this optimization ensures that a
job doesn't wait extra time in an attempt to satisfy
a scheduling locality level that is impossible).

@mateiz and @lirui-intel this unit test illustrates an issue
with apache#892 (it fails with that patch).

Author: Kay Ousterhout <kayousterhout@gmail.com>

Closes apache#1024 from kayousterhout/scheduler_unit_test and squashes the following commits:

de6a08f [Kay Ousterhout] Added a TaskSetManager unit test.
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
This test ensures that when there are no
alive executors that satisfy a particular locality level,
the TaskSetManager doesn't ever use that as the maximum
allowed locality level (this optimization ensures that a
job doesn't wait extra time in an attempt to satisfy
a scheduling locality level that is impossible).

@mateiz and @lirui-intel this unit test illustrates an issue
with apache#892 (it fails with that patch).

Author: Kay Ousterhout <kayousterhout@gmail.com>

Closes apache#1024 from kayousterhout/scheduler_unit_test and squashes the following commits:

de6a08f [Kay Ousterhout] Added a TaskSetManager unit test.
flyrain pushed a commit to flyrain/spark that referenced this pull request Sep 21, 2021
* upgrade  spark call home 0.2.8

* fix the brace issue
flyrain pushed a commit to flyrain/spark that referenced this pull request Sep 21, 2021
udaynpusa pushed a commit to mapr/spark that referenced this pull request Jan 30, 2024
mapr-devops pushed a commit to mapr/spark that referenced this pull request May 8, 2025
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Oct 25, 2026
…che#1024)

### What changes were proposed in this pull request?

The code generator negated an integer value (`-x`, and `abs` where it negates) on the 32-bit and 64-bit lanes with a vector multiply by -1, and on the 8-bit and 16-bit lanes with the Vector API's lanewise `NEG`. It now emits `NEG` on every lane. The two agree on every value, the lane's minimum included, which both return unchanged; `NEG` is one subtract from zero, where a multiply is a long-latency instruction and, on an x86 host without AVX-512, at the 64-bit lane an emulated sequence of several instructions, since AVX2 has no 64-bit vector multiply. The ANSI check is unchanged: it compares the operand with the lane's minimum before the negation.

The emitted-bytes oracle, the emit cost table and its audit are regenerated (only the negation entries move; the cost model's margins are unchanged), as are the two benchmarks whose negation rows moved, `VarkaLongLaneBenchmark` and `VarkaArithmeticBenchmark`. The measurement is committed under `sql/varka/plans/m8/results/VARKA-482/`.

### Why are the changes needed?

Negation was paying for a multiply. On AVX2 hosts, which include common cloud machines such as the AMD EPYC 7763 that GitHub's runners use, a chain of eight negated sums at the 64-bit lane ran 3.9 to 7.3 times slower than it does with `NEG` (523 against 3,812 million rows a second with the data in L2).

### Does this PR introduce _any_ user-facing change?

No change to any answer. Queries that negate integers run faster on hosts without AVX-512, and at the same speed elsewhere.

### How was this patch tested?

- The baseline was committed first (apache#1020): two shapes in `VarkaLongLaneBenchmark` at both lanes, a negation of a column, which is memory-bound and runs as fast as a copy, and a chain of eight negated sums, which is bound by its arithmetic.
- A base-against-head pair on the laptop (AMD Ryzen AI 9 HX PRO 370, AVX-512, which has a native 64-bit multiply), 5 rounds a side: none of the benchmark's 80 rows moves by 10% by both the median and the best.
- Three rounds of each tree under `-XX:UseAVX=2` on the same laptop: the eight-negation chain is 3.9 to 7.3 times faster at the 64-bit lane and 5 to 14% faster at the 32-bit lane, and a lone 64-bit negation 5 to 62% faster. One row reads slower, a lone 32-bit negation with the data in L2 (34,133 against 29,735 million rows a second by the median): each of its runs takes under a millisecond, its rates fall on a few quantized values, and the head's own three rounds span 29,205 to 34,062, so it is the timer's resolution, not a cost.
- The full laptop gate passes (both vector widths, the sweeps, docs and lint), as do Error Prone, `dev/lint-java` and `dev/lint-scala`. An independent review checked the semantics, the moved emitted bytes and costs, the template warm-up's coverage of the new call, and recomputed every figure above from the committed results files.
- Test time: no tests added; the gate's wide and narrow steps took 1,708 and 1,697 s, run beside other heavy jobs on the same machine, against `sql/varka/ci/step-budget.tsv`'s medians of 708 and 707 s, which predate most of the current suites.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5.5)
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