  We consider the optimal online packet scheduling problem in a single-user
energy harvesting wireless communication system, where energy is harvested from
natural renewable sources, making future energy arrivals instants and amounts
random in nature. The most general case of arbitrary energy arrivals is
considered where neither the future energy arrival instants or amount, nor
their distribution is known. The problem considered is to adaptively change the
transmission rate according to the causal energy arrival information, such that
the time by which all packets are delivered is minimized. We assume that all
bits have arrived and are ready at the source before the transmission begins.
For a minimization problem, the utility of an online algorithm is tested by
finding its competitive ratio or competitiveness that is defined to be the
maximum of the ratio of the gain of the online algorithm with the optimal
offline algorithm over all input sequences. We derive a lower and upper bound
on the competitive ratio of any online algorithm to minimize the total
transmission time in an energy harvesting system. The upper bound is obtained
using a `lazy' transmission policy that chooses its transmission power to
minimize the transmission time assuming that no further energy arrivals are
going to occur in future. The lazy transmission policy is shown to be strictly
two-competitive. We also derive an adversarial lower bound that shows that
competitive ratio of any online algorithm is at least 1.325.
