This paper develops an analytical framework for ramp metering, under which various ramp control strategies can be viewed as ramifications of the same most-efficient control logic with different threshold values, control methods, and equity considerations. The most-efficient control logic only meters the entrance ramps nearest critical freeway mainline sections so as to eliminate freeway internal queues, which is derived from a new formulation of the optimal ramp control problem. Instead of assuming the availability of real-time origin-destination information, the new formulation takes advantages of the stability and predictability of off-ramp exit percentages. Those properties of the off-ramp exit percentages are supported by empirical data, and allow us to formulate the optimal ramp control problem as a linear program whose input variables are all directly measurable by detectors in real-time. The solution is also tested on a real-world freeway section in a microscopic traffic simulator for demonstration. Time-dependent origin-destination tables and off-ramp exit percentages are compared as two alternative ways to represent the true real-time demand patterns that are important to freeway ramp metering.