A sawmill (saw mill, saw-mill) or lumber mill is a facility where logs are cut into lumber. Modern sawmills use a motorized saw to cut logs lengthwise to make long pieces, and crosswise to length depending on standard or custom sizes (dimensional lumber). The "portable" sawmill is simple to operate. The log lies flat on a steel bed, and the motorized saw cuts the log horizontally along the length of the bed, by the operator manually pushing the saw. The most basic kind of sawmill consists of a chainsaw and a customized jig ("Alaskan sawmill"), with similar horizontal operation.
Before the invention of the sawmill, boards were made in various manual ways, either rived (split) and planed, hewn, or more often hand sawn by two men with a whipsaw, one above and another in a saw pit below. The earliest known mechanical mill is the Hierapolis sawmill, a Roman water-powered stone mill at Hierapolis, Asia Minor dating back to the 3rd century AD. Other water-powered mills followed and by the 11th century they were widespread in Spain and North Africa, the Middle East and Central Asia, and in the next few centuries, spread across Europe. The circular motion of the wheel was converted to a reciprocating motion at the saw blade. Generally, only the saw was powered, and the logs had to be loaded and moved by hand. An early improvement was the development of a movable carriage, also water powered, to move the log steadily through the saw blade.
By the time of the Industrial Revolution in the 18th century, the circular saw blade had been invented, and with the development of steam power in the 19th century, a much greater degree of mechanisation was possible. Scrap lumber from the mill provided a source of fuel for firing the boiler. The arrival of railroads meant that logs could be transported to mills rather than mills being built beside navigable waterways. By 1900, the largest sawmill in the world was operated by the Atlantic Lumber Company in Georgetown, South Carolina, using logs floated down the Pee Dee River from the Appalachian Mountains.