There is a 1957 article which specifies which city. 1957 is older than the sources in all the other answers.
The
The 1957 Newsweek says:
A nail factory at Kubishev (on the Volga River) is a model. Assigned a production quota, the manager proudly exceeded it - by producing nothing but small nails. When a shortage of large nails was reported by the Construction Trust, the quota standards were switched from number to weight, and the manager switched his production entirely to large nails to the exclusion of small. Seeing no quota advantage in medium nails, he had never made any.
(I think this answer should be unaccepted, because the cartoon in another answer is from 1954 according to several sources, appearing in Krokodil magazine No. 5, page 5.)