Modified the order between configure monitor app and checking the ports

The promise of configuring monitor app might be resolved while the checking ports is still running. Then master tend to start listening to the given port but it is possible that the port is under checking. I thought this is the cause for the CI failure. I also decreased number of workers and read/write times for the cache performance test because the CI machine is not that powerful and it will easily timeout for the high load.