The final Byzantine-Sassanian War was (for my money) the antique world's closest equivalent to a world war. As always in premodern contexts, however, our sources on the size of the forces involved are dubious.
The Byzantine Chronicon Paschale, compiled shortly after the war's end, is probably our best source. The author, however, has an irritating habit of merely referring to "vast throngs" of the enemy. Fortunately, he is slightly more forthcoming about the great Siege of Constantinople in 626, when the Avars and Slavs invested the land walls and a large Persian army camped across the Bosporus at Chalcedon.
According to the author of the Chronicon, the Avar Khagan's vanguard numbered about 30,000, and Constantinople was defended by only 12,000 cavalry. George of Pisidia adds that the entire Avar/Slav force numbered 80,000. The Chronicon also notes that, when the Khagan was attempting to compel Constantinople to surrender, he boasted that the Persians in Chalcedon were ready to send 3,000 troops (presumably a small portion of their force) across the Bosporus at a moment's notice. Theophanes the Confessor, describing a Persian army earlier in the war, numbers it at 40,000 men; I doubt the Persian army at Chalcedon was larger.
Theodore the Syncellus adds the picturesque, if imprecise, detail that the inhabitants of Constantinople spitted "a multitude of [Avar] heads on lances" after the siege.
As for the size of the general populations, the consensus seems to be (according to Warren Treadgold's History of the Byzantine State and Society) that the Byzantine Empire had about 17-18 million inhabitants at the beginning of the war. Sassanid Persia probably (there is no hard data) had about half this number.
Those intrigued by this period might be interested in my page on final Byzantine-Sassanian War, which examines that conflict through the ruins of a church built to commemorate the Byzantine victory.