Skip to content

Compare and delete locking watch - #16821

Merged
DeepDiver1975 merged 4 commits into
masterfrom
compare-and-delete-locking-watch
Jun 15, 2015
Merged

DeepDiver1975 merged 4 commits into
masterfrom
compare-and-delete-locking-watch

Conversation

@PVince81

@PVince81 PVince81 commented Jun 9, 2015

Copy link
Copy Markdown
Contributor

Alternative to #16800 using WATCH command

CC @DeepDiver1975

@PVince81

PVince81 commented Jun 9, 2015

Copy link
Copy Markdown
Contributor Author

Keys are also cleant up properly.

I'll measure the time t1.pl takes and compare between the "watch" approach and "lua" approach.

@PVince81

PVince81 commented Jun 9, 2015

Copy link
Copy Markdown
Contributor Author

Here are the running times of t1.pl for the LUA approach:

1.56user 0.30system 1:00.97elapsed 3%CPU (0avgtext+0avgdata 38012maxresident)k
1.53user 0.30system 1:01.31elapsed 3%CPU (0avgtext+0avgdata 38156maxresident)k
1.53user 0.31system 1:01.22elapsed 3%CPU (0avgtext+0avgdata 37908maxresident)k
1.49user 0.29system 1:00.14elapsed 2%CPU (0avgtext+0avgdata 37976maxresident)k
1.53user 0.31system 1:01.55elapsed 3%CPU (0avgtext+0avgdata 38300maxresident)k

So about 61,038 seconds in average.

and the ones for the WATCH approach:

1.54user 0.30system 1:01.31elapsed 3%CPU (0avgtext+0avgdata 37804maxresident)k
1.53user 0.27system 1:01.00elapsed 2%CPU (0avgtext+0avgdata 38244maxresident)k
1.50user 0.28system 1:00.94elapsed 2%CPU (0avgtext+0avgdata 38140maxresident)k
1.53user 0.29system 1:01.13elapsed 2%CPU (0avgtext+0avgdata 38044maxresident)k
1.54user 0.30system 1:00.92elapsed 3%CPU (0avgtext+0avgdata 38024maxresident)k

About 61,06 seconds in average.

So it looks like the WATCH approach was slightly slower.

I'll try running all the t*.pl suites at once to get more precise numbers.

@ghost

ghost commented Jun 9, 2015

Copy link
Copy Markdown

🚀 Test PASSed.🚀
chuck

@PVince81

PVince81 commented Jun 9, 2015

Copy link
Copy Markdown
Contributor Author

Here is when running all the tests:
Lua:

63.83user 2.51system 5:24.04elapsed 20%CPU (0avgtext+0avgdata 78712maxresident)k
63.57user 2.49system 5:20.46elapsed 20%CPU (0avgtext+0avgdata 78792maxresident)k
69.39user 2.76system 5:33.77elapsed 21%CPU (0avgtext+0avgdata 78704maxresident)k
62.56user 2.51system 5:21.90elapsed 20%CPU (0avgtext+0avgdata 78772maxresident)k
62.59user 2.46system 5:26.66elapsed 19%CPU (0avgtext+0avgdata 78592maxresident)k

Average: 325,366 seconds

Watch:

60.41user 2.44system 5:22.58elapsed 19%CPU (0avgtext+0avgdata 78544maxresident)k
61.64user 2.49system 5:20.06elapsed 20%CPU (0avgtext+0avgdata 78644maxresident)k
64.19user 2.66system 5:25.46elapsed 20%CPU (0avgtext+0avgdata 78804maxresident)k
63.77user 2.65system 5:25.53elapsed 20%CPU (0avgtext+0avgdata 78904maxresident)k
60.84user 2.51system 5:20.95elapsed 19%CPU (0avgtext+0avgdata 78720maxresident)k

Average: 322,916 seconds

These might not be super accurate as I had other processes running on my laptop...

I do have the feeling that there is no significant difference between Lua and Watch approaches, and the Watch approach seems to do fine for now.

@PVince81

PVince81 commented Jun 9, 2015

Copy link
Copy Markdown
Contributor Author

I say 👍 for the WATCH approach

@PVince81 PVince81 added this to the 8.1-current milestone Jun 9, 2015
@PVince81

Copy link
Copy Markdown
Contributor Author

Please rebase. It's probably the recent NullCache change.

@DeepDiver1975 can you review this afterwards ? This is the WATCH approach for clearing lock keys from redis.

@icewind1991
icewind1991 force-pushed the compare-and-delete-locking-watch branch from 076810c to a9ff242 Compare June 12, 2015 15:28
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@icewind1991

Copy link
Copy Markdown
Contributor

Rebased

@ghost

ghost commented Jun 12, 2015

Copy link
Copy Markdown

🚀 Test PASSed.🚀
chuck

@PVince81

Copy link
Copy Markdown
Contributor Author

Needs a second reviewer @nickvergessen @DeepDiver1975

@DeepDiver1975

Copy link
Copy Markdown
Contributor

👍

DeepDiver1975 added a commit that referenced this pull request Jun 15, 2015
@DeepDiver1975
DeepDiver1975 merged commit de3ed8e into master Jun 15, 2015
@DeepDiver1975
DeepDiver1975 deleted the compare-and-delete-locking-watch branch June 15, 2015 12:09
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants