As a new type of wireless network architecture, because of its self-organization, and support multi-hop and heterogeneous networks, Wireless Mesh networks has played an important role in building "wireless cities" and become an research spot in academia and industry. In practical applications, network capacity is the most important need and high network throughput is the most important network performance parameter. As a wireless Mesh network basic issue, network capacity associates the physical characteristics of the network, topology, routing algorithm and channel allocation scheme at all levels. Aiming the question of wireless Mesh network capacity, the paper proposes a hierarchy optimization model from bottom to up and a series of optimization ways based on programming theory. the main content in this paper includes: (1) Optimizing link-channel scheduling strategy, studying the wireless Mesh network channel allocation algorithm, and an interference-based model and linear programming channel allocation and routing joint algorithm is proposed; (2) research of network scalability, taking into account the network coverage and performance at the same time, the paper presents a mixed integer nonlinear programming algorithm for the deployment of the AP; (3) research of gateway deploying strategy, a linear programming based heuristic algorithm gateway deployment is proposed. Research on these issues of network capacity optimization will improve the performance of networks and promote the development of wireless mesh networks; it also has certain significance in the engineering practice.