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

nightly-20240130 nexmark-q5-many-windows perf degradation #14990

Closed
cyliu0 opened this issue Feb 5, 2024 · 8 comments
Closed

nightly-20240130 nexmark-q5-many-windows perf degradation #14990

cyliu0 opened this issue Feb 5, 2024 · 8 comments
Assignees

Comments

@cyliu0
Copy link
Collaborator

cyliu0 commented Feb 5, 2024

Describe the bug

image

https://buildkite.com/risingwave-test/nexmark-benchmark/builds/2944#018d5b1a-81cd-4004-b5c1-21cf9024a263

https://grafana.test.risingwave-cloud.xyz/d/liz0yRCZz1/log-search-dashboard?orgId=1&var-data_source=Logging:%20test-useast1-eks-a&from=1706652288000&to=1706654091000&var-namespace=nexmark-bs-0-14-daily-20240130

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

nightly-20240130

Additional context

nightly-20240130

@cyliu0 cyliu0 added type/bug Something isn't working type/perf labels Feb 5, 2024
@github-actions github-actions bot added this to the release-1.7 milestone Feb 5, 2024
@lmatz
Copy link
Contributor

lmatz commented Feb 5, 2024

The throughput increased likely because of 0cd9ff1 #14558

SCR-20240205-f40
https://github.com/risingwavelabs/rw-commits-history?tab=readme-ov-file#nightly-20240115

now drops because of 9417409 #14855

14588 vs 14855, what a coincidence

@TennyZhuang
Copy link
Contributor

Interesting, but I can't explain this phenomenon. IMO this PR should only have an effect on UDF :)

@fuyufjh
Copy link
Member

fuyufjh commented Feb 19, 2024

Interesting +1, Worth investigating the cause, I think

@cyliu0
Copy link
Collaborator Author

cyliu0 commented Apr 30, 2024

@fuyufjh
Copy link
Member

fuyufjh commented May 8, 2024

@TennyZhuang Any updates?

@fuyufjh fuyufjh assigned fuyufjh and unassigned TennyZhuang May 10, 2024
@fuyufjh fuyufjh modified the milestones: release-1.9, release-1.10 May 13, 2024
@fuyufjh
Copy link
Member

fuyufjh commented May 16, 2024

CREATE SINK nexmark_q5_many_windows
AS
SELECT
    AuctionBids.auction, AuctionBids.num
FROM (
    SELECT
        bid.auction,
        count(*) AS num,
        window_start AS starttime
    FROM
        HOP(bid, date_time, INTERVAL '5' SECOND, INTERVAL '5' MINUTE)
    GROUP BY
        bid.auction,
        window_start
) AS AuctionBids
JOIN (
	SELECT
        max(CountBids.num) AS maxn,
        CountBids.starttime_c
	FROM (
		SELECT
            count(*) AS num,
            window_start AS starttime_c
		FROM
            HOP(bid, date_time, INTERVAL '5' SECOND, INTERVAL '5' MINUTE)
        GROUP BY
            bid.auction,
            window_start
		) AS CountBids
	GROUP BY
        CountBids.starttime_c
	) AS MaxBids
ON
    AuctionBids.starttime = MaxBids.starttime_c AND
    AuctionBids.num >= MaxBids.maxn
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true');

Plan:

 StreamSink { type: append-only, columns: [auction, num, window_start(hidden), window_start#1(hidden)] }
 └─StreamProject { exprs: [$expr1, count, window_start, window_start] }
   └─StreamFilter { predicate: (count >= max(count)) }
     └─StreamHashJoin { type: Inner, predicate: window_start = window_start }
       ├─StreamExchange { dist: HashShard(window_start) }
       │ └─StreamShare { id: 7 }
       │   └─StreamHashAgg [append_only] { group_key: [$expr1, window_start], aggs: [count] }
       │     └─StreamExchange { dist: HashShard($expr1, window_start) }
       │       └─StreamHopWindow { time_col: $expr2, slide: 00:00:05, size: 00:05:00, output: [$expr1, window_start, _row_id] }
       │         └─StreamProject { exprs: [Field(bid, 0:Int32) as $expr1, Field(bid, 5:Int32) as $expr2, _row_id] }
       │           └─StreamFilter { predicate: IsNotNull(Field(bid, 5:Int32)) AND (event_type = 2:Int32) }
       │             └─StreamRowIdGen { row_id_index: 4 }
       │               └─StreamSource { source: nexmark, columns: [event_type, person, auction, bid, _row_id] }
       └─StreamProject { exprs: [window_start, max(count)] }
         └─StreamHashAgg { group_key: [window_start], aggs: [max(count), count] }
           └─StreamExchange { dist: HashShard(window_start) }
             └─StreamShare { id: 7 }
               └─StreamHashAgg [append_only] { group_key: [$expr1, window_start], aggs: [count] }
                 └─StreamExchange { dist: HashShard($expr1, window_start) }
                   └─StreamHopWindow { time_col: $expr2, slide: 00:00:05, size: 00:05:00, output: [$expr1, window_start, _row_id] }
                     └─StreamProject { exprs: [Field(bid, 0:Int32) as $expr1, Field(bid, 5:Int32) as $expr2, _row_id] }
                       └─StreamFilter { predicate: IsNotNull(Field(bid, 5:Int32)) AND (event_type = 2:Int32) }
                         └─StreamRowIdGen { row_id_index: 4 }
                           └─StreamSource { source: nexmark, columns: [event_type, person, auction, bid, _row_id] }

@fuyufjh
Copy link
Member

fuyufjh commented May 17, 2024

It's indeed caused by #14558, but the reason is unknown. Will continue to investigate.

CPU flamegraph: profile results.zip

@fuyufjh fuyufjh removed this from the release-1.10 milestone Jun 12, 2024
@fuyufjh
Copy link
Member

fuyufjh commented Jul 10, 2024

It's indeed caused by #14558, but the reason is unknown. Will continue to investigate.

No results.

Let's close the issue as the problem was already solved.

@fuyufjh fuyufjh closed this as completed Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants