From the Wikipedia article:
Recording on “Ventilator Blues” began in late 1971. The Stones chose to record the majority of the song deep in the poorly ventilated basement of Richards’ home in the south of France, Villa Nellcôte. A well-known feature of the songs recorded in that basement for Exile was the tendency of the heat to distort the guitar’s strings and the close atmosphere lending the songs a distinct, albeit undefined, sound. Richards said, “On ‘Ventilator Blues’ we got some weird sound of something that had gone wrong – some valve or tube that had gone. If something was wrong you just forgot about it. You’d leave it alone and come back tomorrow and hope it had fixed itself. Or give it a good kick.” Recording concluded in the early months of 1972 at Los Angeles‘ Sunset Sound Studios.
The Stones have only ever performed “Ventilator Blues” live once, in this 1972 live performance in Vancouver. The live version captures everything that is swampy and essential about the song, until the end, which sort of falls apart. (On Exile, it trails into “I Just Want to See His Face”.)
Watts said in 2003, “We always rehearse ‘Ventilator Blues’ [for tours]. It’s a great track, but we never play it as well as the original. Something will not be quite right; either Keith will play it a bit differently or I’ll do it wrong.”