5G mobile networks introduce Virtualized Network Functions (VNFs) to provide flexible services for incoming huge mobile data traffic. Compared with fixed capacity legacy network equipment, VNFs can be scaled in/out to adjust system capacity. However, hardware-based legacy network equipment is designed dedicatedly for its purpose so that it is more efficient in terms of unit cost. One challenge is to best use VNF resources and to balance the traffic between legacy network equipment and VNFs. To address this challenge, we first formulate the problem as a cost-performance tradeoff, where both VNF resource cost and system performance are quantified. Then, we propose an adaptive VNF scaling algorithm to balance the tradeoff. We derive the suitable VNF instances to handle data traffic with minimizing cost. Through extensive simulations, the adaptive algorithm is proven to provide good performance.