Green’s Dictionary of Slang

fag n.2

[SE fag, to tire, to perform a wearisome task; ? ult. flag v., to droop, to tire]

1. [late 18C+] a bore, a chore, an unpleasant, tedious task .

2. [late 18C–1900s; 1960s] a hard worker.

In compounds

brain fag (n.)

mental exhaustion.

In phrases

stand a good fag (v.)

[late 18C–mid-19C] to resist tiredness, to persevere.