All posts
TraccarServerPerformanceMySQL

How many devices can one Traccar server handle?

Nov 28, 20264 min read

"How big a server do I need?" There's no single number, because it depends less on the number of devices than on how often they report and how long you keep the data. But you can work it out in a few minutes.

Step 1: messages per second

Each tracker sends a position every few seconds or minutes. The load on Traccar is roughly:

messages per second = number of devices ÷ reporting interval in seconds
Devices Interval while moving Messages per second
100 30 s about 3
1,000 30 s about 33
1,000 10 s 100
5,000 30 s about 167

Vehicles don't move all day. Parked vehicles usually report much less often (every few minutes), so real loads are lower than the table.

Traccar itself handles these message rates comfortably. What usually becomes the bottleneck is the database.

Step 2: database growth

Every position is a row in the database. Estimate rows per day:

positions per day ≈ devices × (moving seconds ÷ moving interval + parked seconds ÷ parked interval)

For example, 1,000 trucks moving 10 hours a day at 30-second intervals, and parked 14 hours at 5-minute intervals:

  • Moving: 36,000 s ÷ 30 = 1,200 positions
  • Parked: 50,400 s ÷ 300 = 168 positions
  • About 1,370 positions per truck per day, or 1.4 million rows a day for the fleet

That's around 40 million rows a month. Without cleanup, the database keeps growing and reports slow down. With a retention policy (for example, keep 90 days of positions), it stays a manageable size. See cleaning up a growing Traccar database.

Step 3: starting points for server size

These are rough starting points for Traccar with MySQL on the same server, with sensible reporting intervals and a retention policy. Measure and adjust.

Fleet size Starting server Notes
Up to a few hundred devices 2 vCPU, 4 GB RAM, SSD Fine for most small businesses
Around 1,000 to 2,000 4 vCPU, 8 GB RAM, fast SSD Give MySQL enough memory for its buffer pool
Several thousand and up Separate database server Tune MySQL, consider faster storage and more RAM

SSD storage matters more than CPU. A slow disk makes the database the bottleneck long before the processor is busy.

Settings that make a big difference

Use MySQL (or PostgreSQL), not the built-in H2 database. H2 is for testing. Production needs a real database server.

Filter useless positions. Traccar can drop positions that add nothing, using settings in traccar.xml:

  • filter.enable turns filtering on
  • filter.invalid drops positions marked invalid
  • filter.zero drops positions at 0,0 coordinates
  • filter.duplicate drops repeated identical positions
  • filter.distance drops positions closer than a set distance to the previous one (useful while parked)

Filtering can cut database growth a lot, especially for trackers that keep reporting while parked.

Tune device intervals. A 10-second interval looks nice on the map but creates three times the data of 30 seconds. Many fleets are well served by 15 to 30 seconds while moving and a few minutes while parked.

Give Java and MySQL enough memory, and keep enough free RAM for the operating system's file cache.

Signs your server needs attention

  • Reports take a long time to load, especially monthly ones
  • The map lags behind real vehicle positions
  • Disk space keeps shrinking week after week
  • High disk wait time when you check with top or iostat

Most of the time, the fix is database cleanup and indexes, not a bigger server. See the Traccar server maintenance checklist.

Summary

  1. Work out messages per second and positions per day from your device count and intervals.
  2. Plan the database: retention policy, SSD storage, enough RAM.
  3. Start modest, filter useless positions and tune intervals.
  4. Upgrade the server when measurements say so, not before.

Not sure what you need? Tell us your fleet size and devices, and we'll recommend a server. See Traccar installation and setup and Traccar maintenance.

Keep reading

Need help with your Traccar server?

I offer Traccar setup and maintenance, GPS tracking apps and Flutter development.