Hi
This just struck me some time ago. It might be helpful in improving system response and overall performance. I'd like some opinions on this:
You know that an hdd ( no matter how fast ) can service only one request at a time. Now, an hdd read or write can happen in these cases
- an application writing/requesting some data
- os performing vitual memory swapping operations
Another fact related to virtual memory swapping is that the OS swaps out a process while the process has requested an hdd operation and is idle waiting for the response.
Here comes the quirky part. The swapping out operation is also actually an hdd write. So suppose a process in memory wants to write something into the hdd. In case of a SINGLE hdd system, what will happen is ..
1. the process in memory will issue an hdd write and will sit idle waiting for the response
2. the os detects that the process is idle, and hence tries to swap it out of memory.
3. the hdd does the write operation requested by the process
4. it then continues to swap out the process itself (which was absolutely unneccessary, since the hdd write request has been fulfilled now).
5. the swapped out process is swapped in at once, as it need not be idle any longer( its write request is fulfilled and has to carry on with other work).
The result is lots of unnecessary swap in-swap out operations, slowing down the system. The problem is caused because of steps 3 and 4 happening ONE AFTER THE OTHER.
In my view, any system with a single hdd will suffer from this problem.
One solution is to have two hard disks ( not two partitions, but physically separate ). The smaller one for EXCLUSIVE use by the OS and for SWAP SPACE. The other larger hdd for applications. This will allow the OS to perform swapping operations independently of the application data read/write operations. Now steps 3 & 4 will happen simultaneoulsy. The hdd for OS will handle the swapping task and the other hdd will service application data requests.
Is any one out there who has a similar hdd combination and has experienced SIGNIFICANT perfomance boost ?
--Shri
( One could argue that this topic be posted in the hardware section...
)
This just struck me some time ago. It might be helpful in improving system response and overall performance. I'd like some opinions on this:
You know that an hdd ( no matter how fast ) can service only one request at a time. Now, an hdd read or write can happen in these cases
- an application writing/requesting some data
- os performing vitual memory swapping operations
Another fact related to virtual memory swapping is that the OS swaps out a process while the process has requested an hdd operation and is idle waiting for the response.
Here comes the quirky part. The swapping out operation is also actually an hdd write. So suppose a process in memory wants to write something into the hdd. In case of a SINGLE hdd system, what will happen is ..
1. the process in memory will issue an hdd write and will sit idle waiting for the response
2. the os detects that the process is idle, and hence tries to swap it out of memory.
3. the hdd does the write operation requested by the process
4. it then continues to swap out the process itself (which was absolutely unneccessary, since the hdd write request has been fulfilled now).
5. the swapped out process is swapped in at once, as it need not be idle any longer( its write request is fulfilled and has to carry on with other work).
The result is lots of unnecessary swap in-swap out operations, slowing down the system. The problem is caused because of steps 3 and 4 happening ONE AFTER THE OTHER.
In my view, any system with a single hdd will suffer from this problem.
One solution is to have two hard disks ( not two partitions, but physically separate ). The smaller one for EXCLUSIVE use by the OS and for SWAP SPACE. The other larger hdd for applications. This will allow the OS to perform swapping operations independently of the application data read/write operations. Now steps 3 & 4 will happen simultaneoulsy. The hdd for OS will handle the swapping task and the other hdd will service application data requests.
Is any one out there who has a similar hdd combination and has experienced SIGNIFICANT perfomance boost ?
--Shri
( One could argue that this topic be posted in the hardware section...
