1H-Swords are very ineffective against Chainmail (I am refering to the chainmail, riveted version like the lorica hamata). I read many opinions and watched some stress-test videos and it seems very very unlikely, that a 1H-Sword could do damage to Chainmail. Perforation is also very unlikely, unless hit with max strenght with a pointy sword in proper condintion (ergo: somebody standing still.. not exactly what a battle looks like). God, it seems even that the most damage you could have, was trauma damage (but then, why in the first place don't use a mace or hammer?).
So my question ist, why for so many centuries was the sword predominant, although it was very ineffective against chainmail (riveted) as opposed to axes or even spears... ?
There are three main reasons why swords were (at times) common when some soldiers wore sword-proof armour:
Not all soldiers wore armour.
Armour often doesn't cover the whole body.
Other weapons were used too.
Often, the sword was a sidearm, a secondary weapon. Infantry would use a spear or other polearm as their main weapon, or a bow or crossbow. Cavalry would use a lance or bow as their main weapon (and would often carry a mace or axe as well as a sword). For some past discussion on why swords were so popular, see my past answers in
Literature gives us useful clues about the effectiveness of weapons. One nice source is Jean de Joinville's Life of Saint Louis, which gives a first-hand account of the Seventh Crusade. In one fight, he describes the wounds as:
There Lord Hugh of Scots was wounded with three spear-wounds in his face, and Lord Ralph too; and Lord Frederick of Loupey was wounded with a spear between his shoulders, and the gash was so wide, that the blood spurted out of his body as through the tap of a cask. Lord Erard of Syverey got such a sword-cut across his face that his nose hung down onto his lip.
In this incident, of the 4 wounded soldiers, 3 were wounded by spears, 2 of them in the (unarmoured) face, and one through the armour. The 4th wound was a face wound due to a sword (Erard later died of the wound). Joinville himself was lightly wounded by fire:
Finally, they brought up a peasant, who threw Greek fire at them thrice. Once William of Boon caught the vessel of Greek fire on his buckler, for if it had set light to anything on him, he would have been burnt. We were all covered with the fire-darts that missed the serjeants. By good luck, I found a Saracen's oakum tunic; and I turned the split side towards me, and made a shield of the tunic, which served me in good stead, for their fire-darts only wounded me in five places and my pony in fifteen.
Bows and crossbows were used effectively:
these eight Saracens kept shooting flights of arrows into our camp, and wounded several of our men and horses.
and
In the retreat of the Teutons, the Saracens wounded a knight of mine, named Lord John of Bussy, with a quarrel through the throat; and he fell right in front of me.
The lance was effective:
A young valet of gentle birth set off in pursuit of them as they were fleeing, and bore down two of their knights to earth, without breaking his lance, and he wounded the Emir so that the spear snapped off in his body.
Sometimes, it isn't clear whether the wounded or killed soldier was wearing armour, and sometimes the weapon isn't specified. For example, somebody might be described as "cut into pieces", or "wounded in the head and hand", but no further details provided. What is clear is that a variety of weapons was used: not just swords, but also spears (both on foot, and when mounted), bows and crossbows, and maces. Also, other weapons such as fire. While the spear and bow and crossbow were very commonly used, the sword and mace also saw common enough use to make it clear that they were both worthwhile weapons to bring to the battlefield.