We consider a node where packets of fixed size are generated at arbitrary intervals. The node is required to maintain the peak age of information (AoI) at the monitor below a threshold by transmitting potentially a subset of the generated packets. At any time, depending on packet availability and current AoI, the node can choose the packet to transmit, and its transmission speed. We consider a power function (rate of energy consumption) that is increasing and convex in transmission speed, and the objective is to minimize the energy consumption under the peak AoI constraint at all times. For this problem, we propose a (customized) greedy policy, and analyze its competitive ratio (CR) by comparing it against an optimal offline policy by deriving some structural results. We show that for polynomial power functions, the CR upper bound for the greedy policy is independent of the system parameters, such as the peak AoI, packet size, time horizon, or the number of packets generated. Also, we derive a lower bound on the competitive ratio of any causal policy, and show that for exponential power functions (e.g., Shannon rate function), the competitive ratio of any causal policy grows exponentially with increase in the ratio of packet size to peak AoI.