We often hear about the Brits boffo counterinsurgency in Malaysia. But are the British still in Malaysia? Yes, it was a communist insurgency, which they defeated. But they also left, which presumably sapped the nationalist dimension from equation. ~Josh Marshall 
As others have pointed out before, the Malayan case is much less encouraging for us, since the communist insurgents  came primarily from the Chinese minority and so did not have nearly as much of a popular “sea” in which to swim. It was more like a small pond. The Muslim Malay majority was not sympathetic to their goals, and Malay nationalists supported the British effort in exchange for a promise of independence, which made the insurgents’ political marginalisation and defeat much, much easier. Decolonisation and independence were already in the works, while communist revolution seemed both unnecessary and undesirable to the majority.
Both Malaya and Vietnamese insurgencies grew out of the resistance to Japanese occupation, but the chief difference was that the Vietminh could appeal to national identity in ways that the communist insurgents in Malaya could not. In other words, the Malayan insurgency lost in part because it could not count on a nationalist dimension in its fight, since the insurgents were not representing a nationalist cause, but rather an ideological one and one associated with a small minority group. (Comparing the Malayan and Vietnamese cases seems to confirm Prof. Lukacs’ view that nationalism is the far more powerful and therefore potentially more dangerous modern ideology when compared to socialism and communism.) Had the British opted to stay in Malaya indefinitely, as the French chose to try to do in Indochina, there might have been a broader-based anti-colonial rebellion, which would have probably been very different in its outcome.
The Malayan case was also significantly different in the number of insurgents involved:
In the end the conflict involved up to a maximum of 40,000 British and Commonwealth troops against a peak of about 7â€“8,000 communist guerrillas.
Estimates of the insurgency’s size in Iraq vary, but I have seen figures this year as high as 60,000. (As I understand this estimate, this refers only to Sunni insurgents.) That’s seven to eight times the number of insurgents, while we have approximately four times as many soldiers fighting them. If the optimal size of a counterinsurgency force is 10x larger than that of the insurgents, the British were much closer to the ideal and had the overwhelming support of the majority, and it still took them nine years before the crisis was formally ended. The lesson from the Malayan experience is that you should fight very unpopular, isolated, highly ideological insurgencies and you should ally with the local nationalists if you want to win. It is very difficult for a government, especially one backed by a foreign power, to compete with nationalist insurgents in the intensity and credibility of their nationalism.