-
Notifications
You must be signed in to change notification settings - Fork 50
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
substantial decline in performance of percentile_agg #397
Comments
@Joyfred Unrelated but I'm curious. Are you actually on Ubuntu 11.2.0 or that's a typo? It's not an LTS version and quite old. |
@jerryxwu
Looks like both Ubuntu 12.10 & Ubuntu 11.2 are not LTS versions. But in case if you mean the OS in which I use to access the DB service, it MacOS 11.4 |
To make testing more simpler, you can also reproduce this issue using this below query, rather ingesting data to a table
In my local(toolkit v1.2) its executed ~18s but in timescale-cloud(tookit v1.3.0) service it took ~29s. Earlier in timescale-cloud it had on-par/better performance when compared to my local. I'm comparing execution time with my local instance, since I'm not aware on how to downgrade timescaledb_toolkit version in timescale cloud. If needed & possible I can test the same. |
I've updated the steps to reproduce section so that its easier to reproduce. |
@Joyfred thanks to your repro cases, one thing that I can confirm is that I do not see meaningful perf difference between toolkit 1.2 & 1.3.1. I also took the opportunity to compare them with 1.5.1 & 1.6.0. At least one my local laptop, I see the perf of both 1.5.1 & 1.6.0 is about 2x of 1.2 & 1.3.1. Is there any chance you could give the latest 1.6.0 a try? Regarding
They are Postgre version and GCC version. I know it's very easy to read them as Ubuntu version. |
@jerryxwu Can users upgrade toolkit versions in timescale-cloud. If so can you point me to the docs. |
@Joyfred you should be able upgrade to a new version by either (within psql)
You can find the relevant documentation here , although it requires some improvement. You can see a list of versions available by |
@Joyfred In my early testing, I overlooked the difference in PG versions. That appears to be playing the main role for the perf difference that I was seeing. Specifically, the same query that you used early
performed 2x better with {PG 13.5 + TimescaleDB 2.5.0 + Toolkit 1.2} than with {PG 12.9 + TimescaleDB 2.5.0 + Toolkit 1.2} running on the same hardware. Once again, I don't see a meaningful perf difference between Toolkit 1.2 & 1.3 when other parameters are kept the same. |
@jerryxwu I've updated the toolkit version to 1.6 in timescale-cloud as recommended {PG 12.0 + TimescaleDB 2.6.1 + Toolkit 1.6.0}, but still there is substantial performance difference, I couldn't see any improvement. I think something's wrong with the service, because I have lower version of toolkit in my local {PG 13.4 + TimescaleDB 2.4.1 + Toolkit 1.2} which is performing much better. If possible can you test in our timescale-cloud service. |
@Joyfred I just did a test on the timescale cloud {2CPU, 8G RAM} running {PG 14.2 + TimescaleDB 2.6.1 + Toolkit 1.5.1 & 1.6.0}. I don't see meaningful perf difference between Toolkit 1.5.1 & 1.6.0. More importantly, for both versions of Toolkit, the query
runs ~ 3x faster than
At this point, we can pretty safe to conclude that the performance difference that you've experienced after the recent refresh is not because of the toolkit version change. I'd encourage you to file a bug report to support@timescale.com so they can diagnose this further for you. You can link this issue to your bug report so that our support team has more context. |
Relevant system information:
SELECT version();
): 12.10Describe the bug
Computation time of queries involving
percentile_agg
has increased by 5x - 10x recently. It has declined to an extent thatpercentile_cont
is sometimes better performing now, which was not the case earlier.To Reproduce
Steps to reproduce the behavior:
(Query 1)
Execute below query in timescaledb_toolkit v1.3.1. Time taken to execute is ~30s. whereas in v1.2 its just ~18s
(Query 2)
In the above approach you might find the difference to be slightly insignificant. If so, please execute below query in v1.3.1. Time taken to execute is ~1600s (sometimes its executing forever & never completes) whereas in v1.2 its just ~116s
The text was updated successfully, but these errors were encountered: