A truly reversible thermodynamic process needs to be infinitesimally displaced from equilibrium at all times and therefore takes infinite time to complete. However, if I execute the process slowly, I should be able to get close to reversibility. My question is, "What determines when something is slow?"
For definiteness, let's take an insulating cylindrical piston with cross-sectional area $A$ and original length $L_0$. There is an ideal gas inside with $n$ molecules of gas with mass-per-molecule $m$. The temperature is $T_0$, and the adiabatic index is $\gamma$.
I plan to expand the piston adiabatically to length $L_1$, taking a time $t$ to do so. If I take $t$ to be long enough, the process will be nearly-reversible. However, $t$ being long does not mean "one minute" or "one year". It means $t >> \tau$ for some
$$\tau = f(A, L_0, L, n, m, T, k_B, \gamma)$$
What is $\tau$?
From purely dimensional considerations, I guess the relationship is something like
$$\tau = \sqrt{\frac{mLL_0}{k_bT}}f(n, L/L_0, A/L^2, \gamma)$$,
but I don't have a strong physical explanation.
Edit A meaningful answer should let me do the following: I take a certain example piston and try expanding it a few times, putting it in a box so I can measure the heat released to the environment. I calculate the entropy change in the universe for the expansions. After doing several expansions, each slower than the last, I finally get $\Delta S$ for the universe down to a number that I think is sufficiently small. Next, I plan to repeat the experiment, but with a new piston that has different dimensions, different initial temperature, etc. Based on my results for the previous piston, how can I figure out how long I should take to expand the new one to achieve a similar degree of reversibility on the first try?
For reference, the pressure is
$$P = \frac{nk_BT}{V}$$
and the speed of sound is
$$v = \sqrt{\frac{\gamma k_b T}{m}}$$,
and I'm happy to have an answer in terms of these or other derived quantities. Formulas for entropy and thermodynamic potentials can be found in the Wikipedia article.