Very high memory usage

I’ve been using Zammad for 3 years now. We have grown from 3 to 5 agents in the meantime, there are about 7000 tickets in the system.

I started using Zammad on an all-in-one system with 16GB of RAM. This offered a good performance for the first 2 years. Last year, however, things started to become worse.

Elasticsearch started heavily eating up memory. While the system uses about 6GB RAM with everything except Elasticsearch running, as soon as I turn on Elasticsearch, the 16GB RAM are being exhausted and the swap partition (4GB in my case) is also being filled. Naturally, this slows the whole system.

For other reasons as well, I decided to move Zammad to a new server with a lot more power and RAM. Everything works well and fast. On this new server, I’m running the current version of Zammad (package) on Ubuntu 22, files are stored on the FS. No performance tuning applied. For Elasticsearch, in accordance with the documentation, the following to configuration entries were made:

http.max_content_length: 400mb
indices.query.bool.max_clause_count: 2000

Unchecked, Elasticsearch takes up a whopping 33GB of RAM on this new system. CPU load of the whole system is very low, though.

I understand that I can instruct Elastic to limit its memory usage by setting Xmx and Xms. Luckily, after the move I’m in the situation that I don’t have to, there’s plenty of RAM available.

Still, I wonder if this is the kind of memory usage one would expect to see? After all, according to the hardware requirements mentioned in the documentation, for just 5 agents, 8GB RAM should be sufficient for Zammad including Elasticsearch.

And say I wanted to reduce memory consumption of Elasticsearch, what number would still be safe (for Xmx and Xms) without notably losing performance? If it is even possible to give such an estimate.

It’s nothing new that Elasticsearch by default takes 50 percent of your memory.
Search for “heap size” in the elasticsearch documentation and limit the memory usage to something like 2GB.

Don’t know what the other problems are, but most likely they can be fixed with slight performance tuning ( Configuration via Environment Variables — Zammad System Documentation documentation ) and ensuring you’ve configured the system to expactations ( Configure Database server — Zammad System Documentation documentation )

1 Like

As I mentioned, I know how to reduce heap size for Elasticsearch.

On my current system, Elasticsearch is not taking up 50% of my memory (128GB in total, so it’s consuming about 25%). On the old system, it was taking up 100% including swap space which is why performance suffered greatly.

Hence my questions, specifically what the consequences of reducing heap size to 2G or 4G will be, if any.

No other problems, just Elasticsearch taking up a lot of memory.

But since you mentioned it, can you give any specific recommendations?

  • WEB_CONCURRENCY - does this need to be changed with only 5 users?
  • ZAMMAD_SESSION_JOBS_CONCURRENT - as I understand this only becomes relevant if there are 40 agents or more.
  • ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS - same as above.
  • ZAMMAD_PROCESS_SCHEDULED_JOBS_WORKERS - I only have one single scheduled job in Zammad so I assume this won’t have any effect.
  • REDIS_URL - it is my understanding that this is default anyway with Zammad 6+, so nothing to do here.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.