Mutual judgments, executions on which are in the hands of the same officer, may be set off the one against the other, except the costs, but if the amount collected on the large judgment is sufficient to pay the costs of both, such costs shall be paid therefrom.