NILFS2 is a log-structured file system for Linux. Log-structured file systems write data and meta-data into a sequential log, to take advantage of the better sequential write performance of most storage devices. This approach necessitates some form of garbage collection, to recover the free space from the log. Currently NILFS2 uses a very simple garbage collection algorithm called Timestamp. This thesis describes the implementation of two additional state-of-the-art algorithms (Greedy and Cost-Benefit), and compares their performance. Additionally it discusses and compares two algorithms to gather and store the necessary meta-data used by the above mentioned garbage collection algorithms. The very promising results show a performance improvement over the Timestamp algorithm by a factor of 1.53 for most scenarios.