In this study, we investigated the trade-off between the applicable field performance and the high sensitivity of infrared absorption sensors and provided an optimization scheme. A near-infrared greenhouse gas sensor was developed based on off-axis integrated cavity output spectroscopy (OA-ICOS) for optimal detection performance with a highly integrated design. The developed sensor included a 12 cm compact cavity length with an effective absorption path length of ~68.2 m, simultaneously focused on carbon dioxide (CO <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sub> ) and methane (CH <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">4</sub> ) detection. Different from in-lab studies, the whole driving and signal processing functions were realized by a single FPGA processer. Using a calibration experiment with limited hardware resources, the developed optimized locked-in amplifier and denoising scheme improved the precision levels by ~3.2 times compared to a traditional design. An Allan deviation analysis showed that the minimum detection limits were optimized to 0.9 ppmv (CH <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">4</sub> ) and 21 ppmv (CO <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sub> ). A field application was carried out in the town of SheLin over the course of 1 day, and the measurement results conformed to the gas diffusion, biological photosynthesis and respiration characteristics, which indicated the potential of the sensor for in situ applications. This work reveals the relationship between limited hardware resources and detection performance and provides an optimization scheme to exploit compact OA-ICOS sensors with improved sensitivity.