An Online Algorithm Optimally Self-tuning to Congestion for Power Managementt Problems