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

Ask about setup Artalk with redis cache #705

Closed
bibicadotnet opened this issue Dec 20, 2023 · 4 comments
Closed

Ask about setup Artalk with redis cache #705

bibicadotnet opened this issue Dec 20, 2023 · 4 comments
Labels
question Further information is requested

Comments

@bibicadotnet
Copy link

I want to test a bit of redis cache configuration on Artalk, specifically my docker configuration is as follows

version: "3.5"
services:
  artalk:
    restart: unless-stopped
    container_name: artalk
    image: artalk/artalk-go
    ports:
      - 8181:23366
    volumes:
      - ./data:/data
  redis:
    image: redis:alpine
    ports:
      - 6379:6379
    restart: always
    expose:
      - "6379"

Configuration inside Artalk
Vxg9Torhhp

Next, restart docker
Ar9fCSX0Hr

According to the notification that appears, everything seems to work normally

iW3LkQMaO9

On the default builtin cache I see that it uses a lot of RAM, mostly 300-400MB, on redis, it uses very little, only 4-5MB

Is this parameter correct, or have I configured it wrong?

@qwqcode
Copy link
Member

qwqcode commented Dec 20, 2023

If you enable the built-in cache, it uses BigCache (an upstream package) as the caching mechanism. It seems that due to its design and Go's handling of memory scheduling and garbage collection, it may appear to have relatively high memory usage.

@qwqcode qwqcode added question Further information is requested duplicate This issue or pull request already exists labels Dec 20, 2023
@bibicadotnet
Copy link
Author

Yes, I came across that topic before

In this topic, I just want to ask if redis configuration is correct? Because when I use it, I don't feel the effectiveness of caching :D

I even have the feeling that cache slows down the system more

@qwqcode qwqcode removed the duplicate This issue or pull request already exists label Dec 20, 2023
@qwqcode
Copy link
Member

qwqcode commented Dec 20, 2023

Hello, I'm sorry I missed part of your feedback! Regarding the speed issue with Redis, you might want to consider switching the TCP connection to a Unix socket to see if that helps. Artalk uses upstream packages from https://github.com/eko/gocache and https://github.com/redis/go-redis for its caching. Currently, Artalk is using go-redis version 9.2.1, but from what I've seen in their latest releases, there doesn't seem to be any significant performance improvements. 🤔 I'm not so sure about this issue; it still requires further testing and tracking.

@bibicadotnet
Copy link
Author

Yes, I will go back to the no-cache default, the default performance is great enough in my opinion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants