Mobile edge computing (MEC) utilizes wireless access network to provide powerful computing resources for mobile users to improve the user experience, which mainly includes two aspects: time and energy consumption. Time refers to the latency consumed to process user tasks, while energy consumption refers to the total energy consumed in processing tasks. In this paper, the time and energy consumption in user experience are weighted as a mixed overhead and then optimized jointly. We formulate a mixed overhead of time and energy (MOTE) minimization problem, which is a nonlinear programming problem. In order to solve this problem, the block coordinate descent method to deal with each variable step by step is adopted. We further analyze the minimum value of delay parameters in the model, and examine two special cases: 1-offloading and 0-offloading. In 1-offloading, all the task data is offloaded to MEC server, and no data offloaded in 0-offloading. The necessary and sufficient conditions for the existence of two special cases are also deduced. Besides, the multi-user situation is also discussed. In the performance evaluation, we compare MOTE with other offloading schemes, such as exhaustive strategy and Monte Carlo simulation method-based strategy to evaluate the optimality. The simulation results show that MOTE always achieves the minimal overhead compared to other algorithms.