Onsager has a conjecture on large time behavior of vortex dynamics derived from Euler equation on 2D torus. For such argument to go through, at one point, one needs to invoke an (un-available) ergodic theory for deterministic Hamiltonian systems. Relaxing to stochastic vortex dynamics (corresponding to mean-field models of 2D Navier-Stokes) instead, one can add another parameter. By considering an re-arranged multi-parameter limit, one can reformulate the problem as a combination of large deviation problem, and large time behavior for quasi-potentials in space of probability measures. This talk will focus on a theory of Hamilton-Jacobi equation in space of probability measures developed for solving both the above problems. Talk will be based on joint works with Andrzej Swiech.