Optimizing php tracking api calls?

I’ve been noticing some load issues on my server and have tracked a large portion of it down to remote piwik tracking calls.

I have a few thousand websites spread out on various servers calling my piwik installation with the php tracking api functions. Remote calls range from 40,000-70,000 per day.

Using Apache’s mod_status I see a large number of these:

GET /piwik/index.php?module=API&method=VisitsSummary
GET /piwik//piwik.php?idsite=1&rec=1&apiv=1&rand=118

Are both a result of the php tracking api?
Is there any way to optimize for a large number of these requests?

If I were to upgrade hardware, what upgrades would produce the most beneficial results?

Currently:
3.3 GHz I3-2120 DC
8GB RAM
64 GB SSD + 1 TB HD (ZFS+SSD ReadCache)

GET /piwik/index.php?module=API&method=VisitsSummary
is a request to the Analytics API.
This should absolutely be cached locally, if your server is remote.

GET /piwik//piwik.php?idsite=1&rec=1&apiv=1&rand=118

This is Tracking API calls recording new visits/pages. These should be OK and cannot be optimized much more.

Hey Matt,

Does the archive.php script happen to call “/piwik/index.php?module=API&method=VisitsSummary” ?

There is often 20-30 requests to it in the apache status log at a time. When nobody is even viewing the piwik stats.