I am using my test code to test HSET command,this code is dead loop to send command,i add print info,i found run slower and slower please check my screenshot:
i want to express slower and slower with data increased,at the begin 1 seconds and .... 30 seconds and more in the code loop
Comment From: zkteco-home
@oranagra please help checking it,the following is config:
port 6379
requirepass ''
appendonly yes appendfilename 'appendonly.aof' appendfsync everysec
maxmemory-policy allkeys-lru
bind 127.0.0.1
rdbchecksum yes
protected-mode yes
loglevel notice
logfile ""
Comment From: enjoy-binbin
Why do you think it's unreasonable? Isn’t it normal that the number of keys increases and the time consumption will also increases?
Comment From: zkteco-home
Thanks for your response,but I still dont understand your answer,The biggest advantage of Redis is its speed,I don’t think it’s reasonable if it slows down as the key count increase.Example: If we use an oracle database, the more data there is, the slower it will be?in while loop i dont understand why process old data.maybe i am wrong for this code
Comment From: enjoy-binbin
i dont understand why process old data
what do you mean "old data"?
you are triggering a RDB save, it will iter the whole hash, to save every key/value, it is just slower in RDB save here, it doesn't mean CRUD of hash keys is slower
Comment From: zkteco-home
here while loop will take up cpu,it will run long time and exit loop.if we last to use redis 1 year and more,keys must be huge,slower is reasonable?
I can understand that more data will slow things down, but I don’t understand that it will get slower and slower.
Comment From: enjoy-binbin
like i said, you are doing the RDB save, please check out RDB and Redis persistence related content.
or the "save" configuration item in the redis.conf
Comment From: zkteco-home
like i said, you are doing the RDB save, please check out RDB and Redis persistence related content.
or the "save" configuration item in the redis.conf
except save "",oherwise it will get slower and slower,i think it should be normal after save
Comment From: zkteco-home
bcz less users are using hash data like my test action,so No big impact on them