![]() |
Question about Prime95 and virtual memory
Just wondering, would Prime95 work faster, especially w/ P-1 factoring, if you somehow told it not to use virtual memory and instead use real memory?
|
[QUOTE=dominicanpapi82]Just wondering, would Prime95 work faster, especially w/ P-1 factoring, if you somehow told it not to use virtual memory and instead use real memory?[/QUOTE]
If there were no other applications running that would cause swapping, then it wouldn't make any difference, of course. In the nontrivial, normal case that total system demand for real pages exceeds the supply of real pages available, then yes, locking Prime95's working set into real pages (essentially the same as your proposal) would allow Prime95 to run faster. But that would be at the expense of all other applications!! All others would have to compete for a smaller number of real pages for [i]their[/i] virtual memory, raising their swapping rates and slowing their execution. The basic idea of GIMPS is to provide client software that makes a minimal impact on performance of the rest of the system. So prime95/mprime are designed to run at low priority, giving up control except when no other application needs to execute. Your proposal doesn't match that intention. If you are willing to accept a drop in performance of the rest of the system, then it would be just about as effective to raise Prime95's execution priority so that it's higher than the priorities of other applications. This would generally result in Prime95's working set remaining resident more thoroughly than other application's working sets. |
[QUOTE=cheesehead]If there were no other applications running that would cause swapping, then it wouldn't make any difference, of course.
In the nontrivial, normal case that total system demand for real pages exceeds the supply of real pages available, then yes, locking Prime95's working set into real pages (essentially the same as your proposal) would allow Prime95 to run faster. But that would be at the expense of all other applications!! All others would have to compete for a smaller number of real pages for [i]their[/i] virtual memory, raising their swapping rates and slowing their execution. The basic idea of GIMPS is to provide client software that makes a minimal impact on performance of the rest of the system. So prime95/mprime are designed to run at low priority, giving up control except when no other application needs to execute. Your proposal doesn't match that intention. If you are willing to accept a drop in performance of the rest of the system, then it would be just about as effective to raise Prime95's execution priority so that it's higher than the priorities of other applications. This would generally result in Prime95's working set remaining resident more thoroughly than other application's working sets.[/QUOTE] Gotcha. Now I know running a bunch of applications can slow down your computer if they all need the processor constantly. Is ram similar that way? E.g. I have 768MB ram, so if Prime95 uses (say) just 400MB of real page memory in P-1 factoring and all other applications together use far less than the 368MB remaining, will my computer still run slower? |
If you are getting a lot of disk activity when you aren't saving files or opening new programs, then virtual memory is using the hard drive in
addition to physical memory and there will be a big slowdown. If not then very little slowdown, because the OS normally is constantly adjusting the number of pages of virtual memory. |
If you use Windows an extremely tiny (4k) freeware utility called memuse
is available that shows six different values for memory in real time. _______Physical___Virtual Total___ Used___ Available It uses bytes instead of pages for each of the values. |
[QUOTE=dominicanpapi82]Now I know running a bunch of applications can slow down your computer if they all need the processor constantly. Is ram similar that way?[/quote]As a first approximation: no, not really.
However, if one looks into the guts at the memory cache where recent memory fetches are stored in case they're re-referenced in a short time, then again one sees competition by various applications for another limited resource: the fast memory cache, which is usually on the order of only one MB or less. E.g., a P4 might have 512K level 2 (L2) cache and 32K level 1 (L1) cache. The L2 cache is faster than main memory, but slower than L1 cache, which is fastest. (When we refer to "RAM", we're usually referring to main memory, the largest but slowest (and cheapest) type.) I'm tempted to add even more detail of how cache works here, but I'm guessing you might not need that and maybe not even most of the above (though newbies might, so I preach to a prospective audience and someday I'll collect ... but I digress. :). Anyway, when the OS switches applications, the second application's memory fetches start knocking out the various data in cache from the first application. As long as one application executes, its working set tends to accumulate in cache, resulting in faster access for that portion of its memory references. When another application comes in, it starts having to fetch everything from main memory but gradually pulls its working set into cache, until it's interrupted by the next application, and so on. Think of it like this: Just as pages gets swapped from RAM to/from disk when demand for RAM exceeds supply, so too do chunks (typically 16 to 128 bytes) of memory get "swapped" in/out (out only if they're modified, just as with paging) of L1 and L2 cache. The more applications, the more "swapping" on cache level, too, somewhat slowing execution, though not as much as RAM-to-disk swapping slows it [quote]E.g. I have 768MB ram, so if Prime95 uses (say) just 400MB of real page memory in P-1 factoring and all other applications together[/quote]plus the operating system [quote]use far less than the 368MB remaining, will my computer still run slower?[/QUOTE] No, not because of competition for RAM. |
I'm a bit confused by this RAM usage.
If Prime95 only needs8 meg? of RAM. Am i wasting time (resources) by throwing 200 megs of my 2 Gig athe the problem? Or should I throw 1 Gig at the problem? |
Memory usage of Prime95 is about 20 MB with the curent range of exponents. You can check this by running taskmanager if you are using windows.
It is only during a particular process the "second stage" of "P-1 factoring" that the maximum memory you set is crucial. This process runs only 2% of the time at the start of the test of an exponent. The rest of the time (ninety-eight percent) memory usage will be about 20 MB for exponents in the order of 35,000,000. If you use the menu "Options" / "CPU" you can even set a different memory limit for day time and night time (and once again those limits are only taken into account during the second stage pf P-1 factoring since it is the only moment prime95 benefits from a lot of memory and uses it if available.) This is all explained also in the readme file and the help file you wil find in the directory were you installed prime95. On a 2GB memory machine you should not run into problems with a daytime setting of 400 MB, unless you are using memory intensive programs (photo editing for instance.) |
[quote=Bender10;89394]If Prime95 only needs8 meg? of RAM. Am i wasting time (resources) by throwing 200 megs of my 2 Gig athe the problem?[/quote]No.
The 200 Megs you specify are only used during stage 2 of P-1 factoring. At other times, Prime95 does not allocate (or de-allocates) that extra workspace it uses for P-1 stage 2, and so it is available to the OS to allocate to any other task. [quote]Or should I throw 1 Gig at the problem?[/quote]If you do, P-1 stage 2 will be able to search farther for factors than it would with 200 Meg, and so will have a better chance of eliminating the need for the lengthy L-L test. However, with P-1 stage 2, the first couple of hundred Megs of workspace has more benefit than the next Gig, so allocate more only if you don't think it will adversely impact your other applications while Prime95 is engaged in P-1 stage 2 (unless you value Prime95 performance more highly than anything else!). - - - Had I known Jacob Visser was going to answer before me, I'd have considerably abbreviated mine. :-) The 20 MB Jacob refers to is completely separate from, and unaffected by, the "Available Memory" setting of 8 meg, or 200 meg, or 1 Gig. You, the user, need not worry about it, since that 20 MB is entirely automatic. |
Ok Thanks,
(Noob, just started a couple of weeks ago) I was sort of on the same page with the memory. I just did not recall if more memory helped with different stages, thanks. (I'm at werk surfing the forum lookin for info). I did try to change the RAM around during a P-1 run, and it kept restarting, so I left it alone. Right now I have all 3 machines set to use 200 meg for 24/7. I may bump up 2 of the machines that have 2 gig up to 400 or so for the evening. |
Ooops almost forgot
I run BF2/Prime95 on one machine (amd 3800, 2gig,sli), with the RAM set to 200, 24/7....... I only play BF2 an hour or so a night....:blush: That should not cause errors, should it? |
| All times are UTC. The time now is 09:55. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.