The dense deployment of small-cell base stations (SBSs) endowed with cloud-like computing capabilities paves the way for pervasive mobile edge computing (MEC), enabling ultralow latency and location-awareness for emerging mobile applications. To handle spatially imbalanced computation workloads in the network, cooperation among SBSs via peer offloading is essential to avoid large latency at overloaded SBSs and provide high quality of service to end users. However, performing effective peer offloading faces many challenges due to uncertainties of the system dynamics, limited energy budget committed by SBS owners and co-provisioning of radio access and computing services. This paper develops a novel online SBS peer offloading framework, called OPEN, by leveraging the Lyapunov technique, in order to maximize the long-term system performance while keeping the energy consumption of SBSs below individual longterm energy budget. OPEN works online without requiring future information of system dynamics, yet provides provably near-optimal performance compared to the oracle solution with complete future information. Extensive simulations are carried out and show that proposed algorithm dramatically improves the performance of edge computing system.