The nonlinear behavior of the two-dimensional Benard problem with periodic boundary conditions in the horizontal direction is studied with particular emphasis on the role of self-consistent chaotic advection. The results show a complex interplay between vortices driven by the Benard (Rayleigh--Taylor) instability and shear flow, which is driven by the vortices [J. Drake [ital et] [ital al]., Phys. Fluids B [bold 4], 4881 (1992)] and which causes their decay. Chaotic advection occurs in the transition from the low Rayleigh number (Ra) regime to the high Ra regime [J. Finn, Phys. Fluids B [bold 5], 415 (1993)]. For the former, vortex flow and shear flow coexist, possibly with slow relaxation oscillations. In the high Ra regime there are vortices localized near the upper and lower boundaries with a shear flow in between. As Ra is decreased from the high Ra regime, these vortices broaden, eventually overlapping, causing self-consistent Lagrangian chaos. This onset of chaos is responsible for several properties of the transition state between the low Ra and the high Ra regimes, most notably the damping of the relaxation oscillations involving vortex and shear flow. It is also observed that the Nusselt number Nu has a peak with respect to Ra in this transition regime characterized by Lagrangian chaos. In the low Ra regime, on the other hand, the relaxation oscillations are on a much slower time scale than the eddy turnover time and the Lagrangian behavior is described by separatrix crossing.