Hi,
I am using Traccar as backend and developed own frontend which work on Apache, initially I test my frontend with few devices and works ver well but when I put load of around 1500 devices the performance has decreased and too mush delay observed, even pages are not loading in browser. I am forwarding all data to my apache server through forward.url in conf file. My question is I have tunned everything like Mysql and server as mentioned in Traccar guide of optimization but nothing about apache optimization it seems apache is unable to handle heavy load. I know Traccar is not using Apache and may be question is irrelevent but if anyone is using same senario and can help or mentioned steps which can tune apache as we have to load more devices but performance is too lagy therefore will be difficult to do so.
Steps which I have taken as below
Server Side:
Ubuntu 20.04 LTS
Memory: 16GB
Total Processors: 4
cat /proc/$(pidof java)/limits | grep "open files"
Max open files 524288 524288 files
Mysql conf:
[mysqld]
max_connections = 768
max_allowed_packet=500M
innodb_buffer_pool_size = 10G
innodb_log_file_size = 1000M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0
Apache conf settings
Timeout 300
KeepAlive On
MaxKeepAliveRequests 600
KeepAliveTimeout 3
Apache mpm_prefork.conf settings for module
StartServers 15
MinSpareServers 20
MaxSpareServers 30
ServerLimit 565
MaxRequestWorkers 300
MaxConnectionsPerChild 10000
This is the current setting which I did after reading different articles from Traccar and internet, if anyone can check and help for more optimized settings will be appreciable.
Probably you have several Mysql queries in your index file (that is not good for the server side with 1500 devices)
Look for optimizing your code, PHP working on the server side, JS working on client side.
Better is to using WS.
Have you determined what is slow exactly? Is it the forwarding?
Actually when I put load of devices on traccar and it starts forwarding data to mysql through php listener, my frontend become dead slow.
Your frontend or Traccar frontend? How is forwarding related to the frontend slowness?
Looks like you have your PHP listener and custom Frontend on the same Apache deployment, right?
In that case, you may want to check your PHP listener script.
Can you provide additional insight on what your PHP listener script does in addition to capturing the data being sent by Traccar.
Does it insert the data into a DB?
Does it query the DB for each data received?
Is there any other computation or checks happening in the script?
If your custom front-end is slowing down when Traccar forwarder sends data to your PHP listener, my best guess would be to start with reviewing the PHP listner script.
Also Please provide some more insight on your front-end what it does.
Is it google maps or any maps deployment?
Are you loading multiple devices on map, if yes how many?
Is it the map screen or other pages also that is impacted?
If it is the map then how are you loading the data onto the map.
Hi,
I am using Traccar as backend and developed own frontend which work on Apache, initially I test my frontend with few devices and works ver well but when I put load of around 1500 devices the performance has decreased and too mush delay observed, even pages are not loading in browser. I am forwarding all data to my apache server through forward.url in conf file. My question is I have tunned everything like Mysql and server as mentioned in Traccar guide of optimization but nothing about apache optimization it seems apache is unable to handle heavy load. I know Traccar is not using Apache and may be question is irrelevent but if anyone is using same senario and can help or mentioned steps which can tune apache as we have to load more devices but performance is too lagy therefore will be difficult to do so.
Steps which I have taken as below
Server Side:
Mysql conf:
Apache conf settings
Apache mpm_prefork.conf settings for module
This is the current setting which I did after reading different articles from Traccar and internet, if anyone can check and help for more optimized settings will be appreciable.