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

一秒执行redis命令200多次?这有点太多了吧,我设置的是秒级定时任务 #37

Closed
jinsuojinsuo opened this issue Feb 16, 2023 · 3 comments

Comments

@jinsuojinsuo
Copy link

1676531774.933469 [0 127.0.0.1:57462] "scan" "1759" "match" "distributed-cron:mole_show:"
1676531774.933515 [0 127.0.0.1:57462] "scan" "2623" "match" "distributed-cron:mole_show:
"
1676531774.933555 [0 127.0.0.1:57462] "scan" "127" "match" "distributed-cron:mole_show:"
1676531774.933595 [0 127.0.0.1:57462] "scan" "2815" "match" "distributed-cron:mole_show:
"

一秒执行redis命令200多次?这有点太多了吧,我设置的是秒级定时任务

@jinsuojinsuo
Copy link
Author

为啥要用scan呢?redis键越多性能越差

@jinsuojinsuo
Copy link
Author

啥时间给优化一下呢

@libi
Copy link
Owner

libi commented Feb 20, 2023

你给 dcron 单独设置一个 redis db试试呢? scan 指令扫描次数取决于当前db内的key/value数量 和 扫描间隔。

@libi libi closed this as completed Feb 23, 2023
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

No branches or pull requests

2 participants