linode/longview — pull request #3 by cederberg (2013-12-21 11:42:19+00:00)
Title: Replaced DBI usage in MySQL app monitor to reduce RSS memory usage.

The DBI module with a loaded MySQL driver costs approx 2000 kB RSS memory, which is really only used for running two SQL queries once per minute.

So, a more memory-efficient solution is to use the MySQL command-line tools instead. This patch does just that. It is still a bit rough on the edges, since it assumes a "mysql" command on the path. Should probably support config and check a few standard locations as well.

```
VmRSS with DBI: 16528 kB
VmRSS without DBI: 14552 kB
```

If this improvement is something that you'd consider, please comment on this PR. I'll clean up the code a bit as mentioned above.