The Supreme Court may at any time require the sheriff of Hinds county, with a competent number of deputies, to attend and perform all lawful orders of the court; and, for any failure in this, after notice of the requirement by the court, the sheriff may be punished by the court for a contempt; and for attending the court he shall be allowed two dollars a day for each person so attending, to be paid as the marshal and porter are paid. And at all times, when proper, the court shall dispense with the services of a marshal and require the said sheriff to perform all its duties.