Mobile edge computing provides an effective approach to reducing the workload of smart devices and the network delay induced by data transfer through deploying computational resources in the proximity of the devices. In a mobile edge computing system, it is of great importance to improve the quality of experience of users and reduce the deployment cost for service providers. This chapter investigates a joint cloudlet deployment and task offloading problem with the objectives of minimizing energy consumption and task response delay of users and the number of deployed cloudlets. Since it is a multi-objective optimization problem, a set of trade-off solutions ought to be found. After formulating this problem as a mixed integer nonlinear program and proving its NP-completeness, we propose a modified guided population archive whale optimization algorithm to solve it. The superiority of our devised algorithm over other methods is confirmed through extensive simulations.