The term "the whole 9 yards" came from WWII fighter pilots in the Pacific. When arming their airplanes on the ground, the .50 caliber machine gun ammo belts measured exactly 27 feet, before being loaded into the fuselage. If the pilots fired all
their ammo at a target, it got "the whole 9 yards."
In English pubs, ale is ordered by pints and quarts. So in old England, when customers got unruly, the bartender would yell at them to mind their own pints and quarts and settle down. It's where we get the phrase "mind your P's and Q's."