The company decides how much the peasants will get as a pay rise.
This forms the pool of money that is to be split amongst the peasants. Somebody splits this pool into a smaller pool, for each department. Each peasant is then ranked against various objective measures by their managers.
Each department then gets all the rankings for its employees, puts the best ones at the top and the worst ones at the bottom. They then look at how much each person is paid, and gives a raise from the merit pool to adjust their pay in line with their performance in the department.