// JP opened flex table

Click to See Complete Forum and Search --> : demand paging


Alpha Vijayan
April 29th, 2004, 01:48 AM
This is the question;
Q) Consider a demand paging s/m for which
CPU utilization - 20%
Paging disk - 97.7%
Other I/O devices - 5%
Which of the following will probably improve CPU utilization and
why?
a)Install a faster CPU
b)Install a bigger paging disk
c)Increase the degree of multiprogramming
d)Decrease the degree of multiprogramming
e)Install more main memory
f)Insatll faster hard disk or multiple controllers with multiple
hard disk.
g)Adding prepaging to the page fetching algorithm
h)Increase the page size
I am having my own suggestions, but don't know whether its correct.Its helpful if i am getting other's opinion.
Thank u for reading this post.

kuphryn
April 30th, 2004, 03:35 PM
I recommend increase memory. I looks like one or more processes are doing something with perhaps gigabits of data.

Kuphryn

dimm_coder
May 6th, 2004, 11:24 AM
What "paging disk" means here?
If it shows the use of swap file, then kuphryn is right, otherwise there can be variants...

OReubens
May 6th, 2004, 04:11 PM
None of the possible solutions you give will be a guaranteed solution. There is simply not enough info to give a concrete solution.

The first step would be to figure out:
1) How large is the budget for hardware upgrades
2) How large is the budget and/or available time to investigate the code, and experiment to make the code more efficient ?

A hardware solution may be a quick fix, but it'll only (if at all) be a solution for this one particular PC/Server. If you have the same program running on multiple PC's, things may be more difficult, as you'd have to invest in hardware for each PC? in this case, tweaking the code may be a better solution.


Next step...
1) Use Task manager to identify the total memory usage (VM Size) the program is using. If this is significantly MORE than the amount of physical RAM, then the program is just a memory hog, or may have a memory leak.
The easy hardware fix would be to install RAM to the point where you have more RAM than the program's VM size.
The software solution would be to identify where the memory is going, and make the program less memory hungry. If this is not really possible, the next solution would be to make the program have better locality of reference causing fewer pages.

2) If the VM Size is low (75% of physical RAM or less), then paging is not caused by running out of RAM. Installing more ram will have little effect, it may improve some because of a somewhat bigger diskcache, but chances are the effects will be barely noticable.
The hardwarefix: install faster disks and/or disk controller. Possibly a RAID system allowing multiple simultaneous access to the disks.
The softwarefix: Change the program to do less I/O calls. combining multiple smaller I/O operations into one larger may improve things.

If the budget and available time for softwarechanges is plenty, the best I can suggest is diving into the code, and identify exactly WHY it is paging. If the program memory bound (using lots of memory), is it I/O bound (doing lots of reads/writes, using lots of shared memory and/or memory mapped files). Maybe another concept of storing/accessing/manipulating the program's data with a better algorythm to do things...


It's impossible to give any concrete solutions that WILL work. Performance tuning is a much too broad subject, with way too many possible solutions and little tricks you can do to improve things. Only with access to the source and a good knowledge of how the program works can you find the best possible solution. Without the source, you have to do the best you can with available means. This usually involves investigation with the built in performance monitoring tools available in Windows. Homing down into the real reason of the main performance bottleneck, then you can make a more educated guess at which hardware upgrade (or Setting in Windows) will change things the most.

//JP added flex table