In: Computer Science
Using one of the referenced website articles or an article of your choice, discuss how to reduce the cost of paging to disk because frequent paging is prohibitive.
As frequent paging leads to
lower and inefficient performance of the system
thus it is prohibitive, as the
paging to the disk is expensive.
To reduce the cost of paging we can buy and
install more memory in the system so the system has more memory to
store the data and goes lesser times to the hard
disk for the data.
Microsoft designed Windows NT to use paging for virtual memory regardless of how much physical memory is available. Paging is the process of temporarily transferring some of the contents of a system's physical memory to the hard disk until the system needs the contents of that memory again. When NT starts, it creates a paging file (pagefile.sys) on the hard disk to store information. Paging frees up physical memory on the system and lets more processes execute. When a process needs code or data that was swapped to the hard disk, the system puts that code or data back into physical memory and transfers other information to the hard disk if necessary. The difference in performance between a hard disk and physical memory is astounding. Hard disk access time is typically 10 milliseconds (ms), whereas physical memory access time is around 60 nanoseconds (ns). Accessing memory is several orders of magnitude faster than accessing the most technologically advanced hard disk drives.
To make your system run more efficiently, you must minimize the effects of paging. One option to reduce paging activity is to add memory. Adding memory reduces the likelihood that the system will rely solely on the hard disk for virtual memory. You can monitor your system's changing memory requirements and properly configure the paging file to maximize paging performance. You must consider the paging file location and size.
Paging File Location
Considerations
During the installation process, NT uses contiguous disk space to
automatically create the paging file. NT always places the file in
the system partition's root directory, although this location is
not necessarily ideal. To achieve optimal paging performance, you
must look at your disk subsystem configuration to determine whether
your system has more than one physical hard disk. If your system
has only one hard disk, you'll want to consider adding an extra
hard disk. NT supports as many as 16 paging files that it can
distribute across multiple drives. Configuring the system to have
multiple paging files lets the system make multiple, simultaneous
I/O requests to the various hard disks, thereby increasing I/O
requests to the paging file.
A system with only one hard disk limits your ability to optimize paging performance. The hard disk must process system and application requests and access the paging file. The physical hard disk might have multiple partitions, but dispersing the paging file among the partitions is a bad idea. Multiple paging files spread across multiple partitions do not increase the hard disk's ability to read or write to the pagefile.sys file. In fact, this setup impedes system performance, because the hard disk must handle paging requests for multiple paging files. However, you can use multiple smaller paging files on multiple partitions on one physical disk when a partition lacks the space to contain an entire paging file.
Calculating Paging File Size
The size of the paging file is critical. Regardless of how many
paging files you create, you need to properly size them, or your
system will have performance problems. If the paging files are too
small, the system might have to enlarge them to compensate for
increased paging activity. When a system increases paging file size
on the fly, it has to create new space for the paging file while
handling paging requests. In this situation, the system will
experience excessive page faults. A page fault is when the system
must find information outside the process' working set, either
elsewhere in physical memory or in the paging file. The system
might also start thrashing. Thrashing is when the system lacks the
physical and virtual memory resources to satisfy usage requirements
and thus relies on the disk subsystem for virtual memory. Thrashing
causes the system to spend more time paging than executing
applications. Thrashing occurs when the Memory: Pages/sec counter
that you monitor from Performance Monitor (Perfmon) is consistently
above 100 pages per second. This problem severely decreases system
performance. Expanding the paging file on the fly also causes
fragmentation. The system might scatter the paging file throughout
the disk rather than maintaining it in contiguous space. This
fragmentation introduces system overhead and severely degrades
performance. Don't make the system responsible for increasing the
paging file size.
If you want, you can refer more at:
https://www.itprotoday.com/cloud-computing/paging-peformance