Data buffering method for balancing multistage memory property and solid-state disk service life

The invention discloses a data buffering method for balancing multistage memory property and solid-state disk service life. The method is applied to a server with a solid-state disk and a mechanical disk. When data is read and written in, the data is divided into large data and small data according to data threshold values, the large data is directly written in the mechanical disk, and the small data is selectively buffered by the solid-state disk. When the mechanical disk is available, new small data is written in the mechanical disk, and when the mechanical disk is in busy operation, the small data is written in the solid-state disk, available performance resources of the mechanical disk are reasonably set, the task queue of the mechanical disk is shortened, and waiting time of the read and write request in the queue is shortened. The advantages of the solid-state disk on small-data read and write can be displayed as far as possible through the scheduling strategies, performance of the mechanical disk is fully utilized, waste of the service life of the solid-state disk is lowered, and reasonable performance of the solid-state disk is provided.