add a flag to switch between single process and mutilProcess.

support running in single process and mutilProcess mode (using process number)