Does your portable generator surge up and down in speed or not get up to speed at all?
Surging engine speeds is often due to it not getting enough fuel. A few things can cause it, such as plugged fuel filters or fuel valves that don't open all the way.
The most common issue we have seen on older portable diesel generators is a maximum fuel setting that is just out of adjustment. When the engine needs more fuel to start or under heavy load, it can't get it because of this maximum fuel limiter. The EPA wanted to control emissions from generators and not have them over fuel. They also wanted to limit power, so they forced manufacturers to install a tamper-resistant set screw. The set screw limits how much fuel the pump can supply.
This sucks because it is the leading cause of generators surging in speed up and down and failing to get up to proper speed when things ware down. What you need to do is what they don't want you to do, and that is to back off a few turns and open up that gap. Think of it as a brick under your gas peddles in your car. You can drive on the highway, but it will take a long time to get up to speed, and you can't accelerate to pass, or in this case, pump a lot of fuel to handle a heavy load that just turned on or that extra fuel you need to start your generator.
What people have done is file off a bit from this pin/set screw that limits the travel of this fuel metering system.