Jump to content

Redis memory should use maxmemory not total_system_memory

Featured Replies

Posted

I cannot find the bug tracker anymore so I'm reporting the bug here.

In Admin CP > Support the Redis stat is shown under the system information table. However it uses the wrong variable total_system_memory, it should be using maxmemory if available or fallback to the former key otherwise.

For example my Redis configuration only allows 128mb on a 8gb memory machine, and IPB shows the usage as a percentage of the total 8gb.

  • Management

Thanks, I'll get that sorted.

7 hours ago, Matt said:

Thanks, I'll get that sorted.

Thanks Matt and Parisian for this, I've brought it up before plus some other issues.

Every time I use any software or Wordpress plug-in which supports Redis there is an option to select a database when inputting the Redis settings. However IPS only uses db0. I've been told it's because Redis doesn't actually have databases, yet you can clearly configure how many databases in the Redis config and also the AdminCP Support page it states which it is using.

Also, if you have multiple IPS Communities on your server, the IPS Support Page stats assumes there is only one so they get blended together. If we could select or enter db0, db4 etc then each IPS community could be assigned it's own dB and therefore the AdminCP stats would be more relevant.

I was just watching my Redis usage charts using Netdata and whenever I refreshed the

IPS AdminCP support page, the Redis keys stat matched accurately what was shown in Netdata which is nice to know!

2991E3DF-3548-4D3E-A09A-B0438C1FB900.thumb.jpeg.659f12ce0d7269027686e15acabab5a0.jpeg

 

5B98758C-79F2-4700-AFF9-19436E7F302A.thumb.jpeg.cb56350be0afd8bb48f4b9142185e5cc.jpeg

 

820CBE8B-5B49-4F22-9F00-41FFB7A2ABE0.thumb.jpeg.d8189e95a23271762a4dd42fcd4d0589.jpeg

 

770E3CAE-62B7-4579-B600-834497A9CA5C.thumb.jpeg.50e34370ddb4545cfb3c302fe4d5ebb7.jpeg

 

I wasn’t aware they get blended together. I have multiple ips installations on the same server. Good catch.

They use disctinct prefixes like e.g. " ee6ff0de67_" though.

  • Management

Yeah, we use distinct prefixes so there is no concern about incorrect data being loaded.

On a probably unrelated note, as I've recently set this up on my site. When I run the support tool something is not working, the redis size goes up 3/4M easch time, I'm at 30M now, does this ever reduce / does redis ever remove the stuff thats no longer used? Concerned it will just increase and increase

Edited by marklcfc

Yes, Redis removes the data no longer in use.

31 minutes ago, bfarber said:

Yes, Redis removes the data no longer in use.

Do you know when that happens? Just ran a few more support > not workings and now its upto 39M from 30M just before.

Edited by marklcfc

It can happen at different times. Sometimes Invision Community explicitly cleans up its caches itself, sometimes caches are stored with an expiration timestamp and Redis will automatically purge them, and sometimes Redis simply purges older caches that haven't been used in a while. There are various Redis configuration options to control this sort of thing so I can't give you a blanket answer.

  • Management

Every single bit of data we store in Redis has a TTL attached. The longest is a week, the shortest is 30 mins. Most are about a day. Redis is pretty good at managing memory so I wouldn't worry too much.

What is happening is that each time you run the support tool, the Redis prefix changes, so it stores more and more data - but Redis will then clear up the stale data for you automatically.

  • 1 month later...

Since I upgraded to 4.4.5 my redis shows 0B memory used, previously it was 56G reflecting the server memory

redis.png.6a92c00ac7ca02c6776c625e94551744.png

Please submit a ticket so we can take a look.

16 hours ago, marklcfc said:

Desde que eu atualizei para 4.4.5 meu redis mostra 0B de memória usada, anteriormente era 56G refletindo a memória do servidor

redis.png.6a92c00ac7ca02c6776c625e94551744.png

Here is the same "of  0B memory used"  ☹️

Edited by DSystem

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.