A new Sail for Sesame "This document describes the design of a new Sail for Sesame. [The] Goal for this Sail implementation is to offer a scalable and fast persistent repository for RDF data that does not need third-party applications like databases. More specifically: one should not need to install any additional software to be able to use this Sail. This does not include LGPL-compatible, embeddable Java components. Main reasons for coming up with a new Sail are that the currently available memory Sail isn't scalable enough when limited memory is available, and the RDBMS Sail is both complicated to install and too slow in aspects like adding and removing statements."
Kowari is actually a svelt 2.4MB (or so) when Jena, Jetty, and everything else is removed. Without Jena, however, you can't parse RDF. If you are only interested in storing longs that gets down to about 1.5MB. I meantioned Paul's earlier ideas on various persistent triple stores.