摘要 |
The present invention provides a method and apparatus for adjusting an I/O channel on a virtual platform, which are applied in the virtual technology field, and the method for adjusting an I/O channel includes: counting, by a host HOST, current average I/O throughput of multiple virtual machines VMs operating on the HOST; increasing or decreasing, by the HOST, working threads for processing VMs between front devices and back devices of the multiple VMs according to the current average I/O throughput; and adjusting, by the HOST, a mapping relationship between queues in the front device, queues in the back devices of the multiple VMs, and working threads for processing VMs. According to the present invention, channel resources occupied by I/O channels between the front devices and the back devices of the multiple VMs are dynamically adjusted according to I/O throughput of the multiple VMs operating on the HOST. When the I/O throughput decreases, idle I/O channel resources are released, thereby avoiding a waste of the I/O channel resources; when the I/O throughput increases, the I/O channel resources are increased, resulting in an improved data transmission capability of the I/O channels. |