Patent ID: 8417833

Claim:
A network device that manages data over a network, comprising: a network communication component that sends or receives data over the network; and a processor that performs actions involving the data, including: reading the data; compressing the data using a compression mode; determining a compression time for compressing the data; writing the compressed data to a buffer for use in transmitting the compressed data over the network; determining a write time for writing the compressed data to the buffer; determining a ratio by dividing the compression time by the write time; and selectively modifying the compression mode based in part on the determined ratio of compression time divided by write, wherein selectively modifying the compression mode further comprises: if the ratio of compression time/write time is greater than a threshold value, selectively selecting another compression mode having a lower expected compression ration than a currently selected compression mode; and if a ratio of write time/compression time is greater than another threshold value, selectively selecting yet another compression mode having a higher expected compression ration than a currently selected compression mode.