Racism is one of the forms of distinction between 'us' and 'them'. Such distinction to 'us-friends' and 'them-enemy' were very often in relations between tribes and societies. Just open the Bible for the examples - the other peoples in Holy Land are described as the ones that must be conquered and eradicated. In many languages their tribe name means 'people'.
Memetics, such as Vera Birkenbihl argument, that distinctions based on external appearance are similar to the distinction between friend and foe based on smell by rats. It enabled humans to join in large groups, but the rivalization for the resources have stayed (resources are always limited), it simply moved to the higher level (hostility between the whole communities, not the single groups).
However, such primitive distinctions, based only on physical appearance were sistematically replaced by distinctions based on ideology, customs, religion etc. Such distinctions have enabled the groups to join in even larger communities, and also enabled assimilation of the most valuable members of other groups.
The nazi is the return to very primitive and ancient distinction mechanisms. They are the great disadvantage in comparison to ideology-based distinctions. Just simple example - how many great scientists have left Germany because they were Judes - and what Hitler could achieve if he wasn't antisemite (he wasn't be Hitler then, however). It's a great example that the regime practicing racism have the big disadvantage which makes its fall very probable.
Theoretically, if all regimes will become racist, they would survive, as long as they would be able to destroy any regime that would like to use advantages of refusing racism. However, I don't think they would be able to perform such policy for more than one century.