flaggedtemplates table that keeps track of templates used in stable versions, keep the tracking forever. In other words, it's templatelinks table but for the whole history of the wikis. That's why in ruwiki it's 168GB and bigger than all other tables of ruwiki combined. Most of these are not needed and should be just deleted.
Fixing this would drastically reduce size of s6 and possibly lots of other places.