-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
drop table and add/drop column still slow despite effort in #71800 #97195
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
We'll look into whether there are any performance regressions on our side. Some of this is likely due to the online nature of schema changes in cockroach. Do you notice this being slower than 22.1? |
I remember it was getting better overtime (may be due to #71800 and many optimization before that) and do not recall it get slower (actually I don't just "remember" :), test suite run show that migration indeed run faster overtime). |
How do you run your test suite? On what type of machines? With what settings? Have you tried disabling fsync? |
Hello, thank you having interest in this, I'll explain in detail (I believe most people already have this problem - they just didn't report it yet): How do you run your test suite?
As you can see, What type of machines?The machine running is pretty old (but comparison still fair because postgres run on the same machine). CPU: AMD Athlon(tm) X4 860K Quad Core Processor
With what settings? Have you tried disabling fsync?Linux server (ubuntu) with default setting (cockroachdb default setting too), no I've not disabling fsync. |
Have you seen https://www.cockroachlabs.com/docs/stable/local-testing.html? I think those settings may help dramatically. |
Thank you! It does help, from 9s to average 4.{5..9}s now. But only the change Interestingly, I try the same technique on postgres (create tmpfs filesystem on memory and let postgres run on it), I guess we could close this then 😃 |
My appologize, I was using this script https://blog.vergiss-blackjack.de/2011/02/run-postgresql-in-a-ram-disk/, I was lazy and not read through the whole script. Redo the experiment with postgres it does make a different from 1.2s to consistently 0.5s, just don't want to spread wrong information. Sorry and good day. |
Is your feature request related to a problem? Please describe.
Hi cockroachdb,
I saw effort in #71800, but despite that running migration in real project still obnoxious slow.
It's mention in the old issue running schema change in cockroachdb vs postgres is about 10 times slower (15 mins vs 2.5 hours).
I'd like to share real number down to milliseconds of database migration in
v22.2.2
and discussion which is the actually slowness operation (please open this issue in two tabs for easier comparing number below):Postgres:
CockroachDB:
Combine all above, postgres finished in 9.451s while cockroachdb finished in 1.165s.
As you can see above,
create table
operation is blazingly fast (still slower than postgres - but it fast).However,
drop table
andadd
/drop
column could be 40 to 100 times slower compare to postgres.In old issue, there a mention of tweaking cluster setting (but I'm not doing that here), the reason is: when someone new try out cockroachdb, if test suit from postgres run 10 times slower on cockroachdb could create a false image database being slow and they stop consider cockroachdb instead of tweaking it.
Describe the solution you'd like
If we could improve on
drop table
,add
/drop
column time, it might greatly improve cockroachdb adoption among frameworksSide note: in local env, there is no add/drop index operations, I could not provide data on that (it might or might not be another source of slowness).
Jira issue: CRDB-24568
The text was updated successfully, but these errors were encountered: