jalbert@cs.ubc.ca (Francois Jalbert) (12/11/89)
Hi there. I am considering buying a 4Mb extended memory card for my AT. I would use it as a huge RAM disk from which I could run PC-TeX. I hope to speed up things since using LaTeX involves reading and writing so many files. However, I would like to evaluate during a typical PC-TeX run, how much time is spent doing disk operations or internal operations. This would give me an idea of how much speed improvement should be expected. Of course, I would rather do that before buying a card and the memory chips. Is there such an utility available from somewhere? I browsed through SIMTEL but didn't see anything applicable. I have a pretty good idea how to write in assembly such an utility. Just monitor all the disk related interrupts and add up the total time spent there. One could increase the frequency at which the timer_tick interrupt is called to improve the resolution. And also make sure the frequency at which the original timer_tick routines are called is left unchanged. I just know it will take me a day to come up with the beast, I'd rather avoid it. Any info would be appreciated. Thanks in advance. Francois '
jalbert@cs.ubc.ca (Francois Jalbert) (12/12/89)
Earlier today, I mentioned I was looking for a way of determining how much time is spent doing disk operations in a typical run of PC-TeX. I got a few replies and I would like first, to thank everybody who took the time to reply. The easiest solution relies on running your application twice, once in slow mode, and then in turbo mode. Assuming the time spent doing disk operations is independent of the clock speed, one can deduce the desired information as follows. Let D be unknown time spent doing disk-bound operations C be unknown time spend doing CPU-bound operations in slow mode 2C/3 be unknown time spend doing CPU-bound operations in turbo mode S be known total time in slow mode T be known total time in turbo mode Then the percentage of time spent doing disk operations in turbo mode is: % = 1 - (2/3) (S/T) I ran a small PC-TeX job and got S=14 secs and T=12 secs. I deduce %=.67 I ran a medium PC-TeX job and got S=42 secs and T=32 secs. I deduce %=.37 I can therefore expect small PC-TeX jobs to go 300% faster with a RAM disk. And medium ones go only 50% faster. This is all approximate, but gives one an idea of what is to be expected. I am currently reevaluating my need for a 4 Mb RAM-disk. Francois '
jalbert@cs.ubc.ca (Francois Jalbert) (12/13/89)
Recently, I mentioned I was looking for a way of determining how much time is spent doing disk operations in a typical run of PC-TeX. By comparing runs in slow and turbo modes, I was able to do just that. I estimated I would get a 50% increase in efficiency on medium size jobs with a 4Mb RAM disk. This brought along a few additional comments. Once again, I thank heartily everybody who sent mail and suggestions. Obviously, this is a topic of interest. I was surprised to see several people independently suggest I should go for a disk cache approach. Typically, 1 Mb was recommended. So many people can't be wrong! I have been thinking about that today. A few comments came to mind: A) Disk caching is obviously slower than simply having everything on a RAM disk, unless everything fits in the cache. Then perhaps, some overhead from DOS might be avoided. Therefore, the estimated 50% improvement seems like an upper bound no matter what approach is selected. It would be interesting to have somebody with a big memory expansion board try to run some application in slow and turbo mode from the RAM disk and see if the formula I worked out before estimates reasonably the speed improvement achievable with a RAM disk (and cache). (See Article 36592 of comp.sys.ibm.pc:) B) My typical work cycle involves reading PC-Write 3.03, then PC-TeX, then the preloaded lplain format, then a bunch of small files, and then my PTI previewer. We have the following very approximate sizes: PC-Write 250Kb <-- PC-TeX 250Kb | | lplain.fmt 250Kb | ^ Read Cycle misc 250Kb | | PTI viewer 250Kb --> C) I have the impression such a cycle in a 1Mb cache would cause the next application involved in my cycle to be flushed out of the cache by the loading of my current application. I would need at least a 1.5Mb cache. D) Furthermore, these are just the files routinely read. I assume the ones written also flush data out of the cache. And these can be quite big, usually a few 100's of Kb. So a 2Mb seems to be the minimum called for. E) However, additional RAM will speed up dramatically the loading of these applications. No matter what I do, having PC-Write available in any situation within 0.5 sec is a plus. To make a short story long, The RAM disk allows me to tailor performance optimally with the use of setup batch files for each application. Disk caching is perhaps less optimal given a specific application, but is very flexible as it works for me all the time. I wonder if there is a driver out there that can be switched between disk-cache and RAM-disk mode. That would be the best of both worlds. I am still thinking (and overheating...). Francois '
dross@umn-d-ub.D.UMN.EDU (david ross) (12/13/89)
In article <5966@ubc-cs.UUCP> jalbert@cs.ubc.ca (Francois Jalbert) writes: >I wonder if there is a driver out >there that can be switched between disk-cache and RAM-disk mode. That would Get a reconfigurable cache (such as EMC110 on SIMTEL) and a reconfigurable RAMDISK (such as PC Mag's XPANDISK). The main disadvantage is when you reconfigure you lose the data.
poffen@molehill (Russ Poffenberger) (12/15/89)
In article <5945@ubc-cs.UUCP> jalbert@cs.ubc.ca (Francois Jalbert) writes: >Hi there. I am considering buying a 4Mb extended memory card for my AT. I >would use it as a huge RAM disk from which I could run PC-TeX. I hope to >speed up things since using LaTeX involves reading and writing so many >files. However, I would like to evaluate during a typical PC-TeX run, how >much time is spent doing disk operations or internal operations. This would >give me an idea of how much speed improvement should be expected. Of course, >I would rather do that before buying a card and the memory chips. Is there >such an utility available from somewhere? I browsed through SIMTEL but >didn't see anything applicable. I have a pretty good idea how to write in >assembly such an utility. Just monitor all the disk related interrupts and >add up the total time spent there. One could increase the frequency at >which the timer_tick interrupt is called to improve the resolution. And >also make sure the frequency at which the original timer_tick routines are >called is left unchanged. I just know it will take me a day to come up >with the beast, I'd rather avoid it. Any info would be appreciated. Thanks >in advance. Francois > ' If you are REALLY concerned about speed, you should get a card that implements both expanded memory. You should then set up a ramdisk in expanded memory. Expanded memory is generally faster because it doesn't cause the cpu to switch to protected mode, then have to be reset to get to normal mode. Russ Poffenberger DOMAIN: poffen@sj.ate.slb.com Schlumberger Technologies UUCP: {uunet,decwrl,amdahl}!sjsca4!poffen 1601 Technology Drive CIS: 72401,276 San Jose, Ca. 95110 (408)437-5254