Finely chop the pancetta after removing any rind; finely grate the pecorino and parmesan and mix together.
Beat the eggs in a medium bowl and season with a little freshly grated black pepper; set aside.
Add 1 tsp salt to the boiling water, add the spaghetti and, when the water returns to the boil, simmer covered for 10 minutes or until al dente.
Squash the peeled garlic cloves with the blade of a knife to bruise them.
While the spaghetti cooks, melt the butter in a large frying pan or wok and add the pancetta and bruised garlic.
Cook on medium for about 5 minutes, stirring often, until the pancetta is golden and crisp; remove and discard the garlic.
Keep the heat low under the pancetta. Lift the pasta from the water with tongs and add it to the frying pan with the pancetta, allowing a little cooking water to come with it.
Mix most of the grated cheese with the beaten eggs, keeping a small handful back for sprinkling.
Take the pan off the heat and quickly pour in the egg-and-cheese mixture, lifting the spaghetti with tongs or a fork so the egg thickens without scrambling and coats the pasta.
Add extra pasta cooking water, several tablespoons at a time, to loosen the sauce until glossy and saucy; season with a little salt if needed.
Twist the pasta onto plates with a long-pronged fork and serve immediately with the remaining cheese and a good grating of black pepper; if it dries, splash in more hot pasta water.
Tips
Finely grate cheeses and mix most with the beaten eggs, reserving a handful for serving.
Reserve a few tablespoons of hot pasta water; it loosens the sauce and creates a glossy finish.
Serve immediately with a sprinkling of reserved cheese and plenty of freshly grated black pepper.