reduce memory usage
Fix nightly build error on debian6.0.1
- added sleep