Search code examples
sparqlfuseki

How to clear the unused space in fuseki


Observed a behaviour associated with fuseki that, even after dropping the graphs from a fuseki dataset (using DROP GRAPH command), the actual size of the folder "run/databases" is not decreasing. Recently read about the backup and restore mechanism to solve this issue, and just wanted to know if any alternative approach is also available for the same. Also, Is this size issue happens in fuseki 3x versions? I've observed this in fuseki 2.4.0 version.

Thanks in advance!


Solution

  • This answer relates to the current Apache Jena Fuseki - version 4.2.0.

    TDB2 has a compaction tool (only run this when Fuseki is not running). tdb2.compact

    Or, depending on your setup, curl -XPOST http://server:port/$/compact/<datasetname> will compact a database in a running server.