Terpenes are a large and diverse class of organic compounds produced by plants and some insects. They serve protective functions for producing organisms and are also important biosynthetic building blocks. Terpenes are derived from isoprene units that can be linked together in linear chains or rings to form compounds of varying sizes, including hemiterpenes, monoterpenes, sesquiterpenes, and larger polyterpenes. The mevalonate pathway produces the basic terpene precursors isopentenyl pyrophosphate and dimethylallyl pyrophosphate from acetyl-CoA in most organisms.