Are you using default queries or custom ones? You need to make sure tables have all relevant indexes to reduce memory usage and speed up queries.
Default queries.
relevant indexes anything specific to do? As I haven't changed the default db nor queries/config in anyway except add some additional columns in device table.
If you think there are some problems with performance or memory usage, I would recommend to investigate query execution plans and then see if any new indexes need to be created.
Dear Anton,
I did that here is the outcome/result as per me overall I did not see much changes to be done in terms of indexes etc. however I followed the steps below.
I killed mysql - Memory usage reduces few %
I killed apache and tomcat - Memory usage reduces few %
I killed traccar - Memory usage reduces yet few %
However overall still remains above 75%
I reboot the server, it goes back to Point 3.
Any advice if its something to do with traccar server or otherwise?
I am planning to upgrade the memory either way, yet thought would share this with you for your inputs/suggestiosn just incase, you might know of why this is happening.
Why do you need Apache and Tomcat? Are you running something else on the same server?
If you are concerned about Traccar memory usage, you can try to limit it in the wrapper config. Probably Java doesn't do garbage collection because you have enough resources.
Apache and Tomcat is because, I am having my own WebApp, and default webapp is disabeld.
I will try to limit memory usage of traccar in wrapper config and let you know, thanks for the input. Let me see what happens with it :)
Tried uncommenting `wrapper.java.maxmemory=64'
No luck yet. I am kind of confused about this.
Maybe this will help:
https://wrapper.tanukisoftware.com/doc/english/prop-java-maxmemory.html
Dear Anton,
It did help, Based on your earlier inputs and assistance, and link shared. I was able to make further changes in the value/set in wrapper.
For now, for the past 5+ hours, The memory usage has reduced by 50%. I will monitor it for a day more specially during peak of transactions.
For total of 12 hours it worked fine, however since then I have been constantly having the need to restart the traccar service. or the Server Itself.
as restarting traccar service helps a bit, and restarting whole server reduces memory usage pretty well and gives another 8 to 12 hours before it reaches the maximum usage.
I am attaching a screenshot below, of htop command on ubuntu filtered by command with tree view. Would be thankful if you can have a look at it and recommend me a way forward. I am using openjdk/java.
and
It looks like it's using only 2% of the memory. Why do you think there is a problem?
True, It looks like it's using only 2%, However let me share the 'top' commands output as well below.
The problem right now is that, its using 34% of actual memory, and within 12 to 18 hours it will reach 90%+ of usage. Right now its increasing gradually...
It still shows 2%. Can I see a screenshot with 90%?
Its at 87% now. Sharing the pattern graph (Which shows the timeline of increase as well) plus screenshot of htop and top command.
Dear Anton,
I have some queries, on 3.2 Server. maybe even for 3.3 it applies.
What is the best configuration settings for MYSQL Server to be used with Traccar to ensure minimal memory usage.
When the number of devices run into 1000's specially, the memory usage by MSYQL Increases. Hence I was wondering if there are some specific things to consider for MYSQL Db users.