Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Page file on Ram Drive for Performance?

  1. #1
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350

    Page file on Ram Drive for Performance?

    At work we are developing some .NET software and the page file gets absolutely huge (easily 1.3 Gb) because we are caching data for performance. After a certain point my machine just thrashes on the hard drive constantly and things become slow. It doesn't help that client machines at work don't have much RAM (512, 768 or 1024 MB) and are old like P4 2.4 Ghz machines!

    My frustration with Microsoft XP is that it sends stuff to page file when you have tons of memory left over.

    I was wonder as a counter hack to Microsofts crap page file management if I could do something like this....Take a PC with 4 Gig of RAM total and dedicate 2 Gig of it to a RAM Drive and then assign the Page file to that RAM Drive.

    The idea is that if Windows insists on using the F--KING Page File unnecessarily at least it will be now on fast RAM instead of a slow hard drive.

    Now I know at least 1 person will be ready to read this post and tell me that I'm the dumbest mofo on Earth for even asking the question. My challenge to those that want to flame me is to try what I have proposed and quantify if there is a performance gain or loss (or no difference).

    Note: Some specialized RAM drive software might be needed to try all of this...

  2. #2
    Second Most EVIL YARDofSTUF's Avatar
    Join Date
    Nov 2000
    Location
    USA
    Posts
    69,980
    Not sure if with 4 gigs and doing the 2gig ramdrive if you'd get 2 gigs on the ram drive and 2 for the system, or if you'd still be limited to about 3.23 or 3.73 gigs.

    It should clear up some of the hdd use. do you have a 2nd hard drive on the system you could put the pagefile on, that way it would be reading from the other for the pagefile an from the system drive for the info your pulling up?

  3. #3
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,336
    There would be a performance increase, and noticable too, IF the workstation was multitasking, but if only running your new application then you won't notice a heck of a difference. Of course, I have not actually tested this, but in theory that's what would occur. An application that causes caching of 1.3 GB of data must be a huge application. What's the nature of the app? Or is the caching a result of the development apps (visual studio, etc?
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  4. #4
    Moderator YeOldeStonecat's Avatar
    Join Date
    Jan 2001
    Location
    Somewhere along the shoreline in New England
    Posts
    50,860
    Main component running on just 1x workstation as the "server"? Get the pagefile on a separate spindle if so.

    Have you monitored actual pagefile usage? You have performance monitor, task manager.

    Low system impact antivirus?

    Can always get a sandbox rig..stuff it with RAM..and try the "DisablePagingExecutive" registry trick.
    MORNING WOOD Lumber Company
    Guinness for Strength!!!

  5. #5
    Dr Tweak mnosteele52's Avatar
    Join Date
    Jul 2001
    Location
    Chesapeake, VA
    Posts
    11,912
    In theory what you are suggesting should work but you need to try it to see. Another option would be to try OpenVMS Performance Suite.


  6. #6
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by TonyT View Post
    There would be a performance increase, and noticable too, IF the workstation was multitasking, but if only running your new application then you won't notice a heck of a difference. Of course, I have not actually tested this, but in theory that's what would occur. An application that causes caching of 1.3 GB of data must be a huge application. What's the nature of the app? Or is the caching a result of the development apps (visual studio, etc?
    Of the 1.3 Gb, about 500 MB is what I see on startup...McAfee Virusscan and Novell login stuff really bogs things down to start. The application adds abotu 800 MB to the page file. We are almost 15% done development of our software so I can just imagine how much bigger this thing might get!

  7. #7
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by YeOldeStonecat View Post
    Main component running on just 1x workstation as the "server"? Get the pagefile on a separate spindle if so.

    Have you monitored actual pagefile usage? You have performance monitor, task manager.

    Low system impact antivirus?

    Can always get a sandbox rig..stuff it with RAM..and try the "DisablePagingExecutive" registry trick.
    No the server is separate.

    I'm not sure what I would monitor actual pagefile usage for. I can see that our application is taking a certain amount of pagefile right in task manager. The basic problem is that I open new screens in our application and it takes up page file space and then when I close the screen the application doesn't really reduce pagefile space.

    Unfortunately I can't control the antivirus our corporation uses. We're a 2000+ person company, I really can't impact these decisions.

    Disable Paging Executive...ok let me read about that, thanks for the suggestion.

  8. #8
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,336
    The basic problem is that I open new screens in our application and it takes up page file space and then when I close the screen the application doesn't really reduce pagefile space.
    This type of problem is not solved by ram drives or moving the page file to a separate disk, it is solved in the actual application code. Make the code more efficient, i.e. use object oriented code. I don't know what language your app is being written in...There should be windows APIs that can be used to unload the windows from memory.
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  9. #9
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    Yep, your idea will work. I've done t.

    Also, any apps that you install to the ramdrive will help performance as well. Thing is hey get deleted on a restart or reboot. Get a ramdrive that offers a feature to save image of ramdisk, and replace image on reboot.

    Also on a reboot your page file gets wiped out and built new, which also heps performance, cause it doesn't get fragged.

    Dedicate the ramdrive to page file only. use a separate ramdrive for installing apps to.

    Also use the above tweak "DisablePagingExecutive" so less gets paged. Paging will stil occur, but less of it.

    If i remember correctly, windows wizards won't allow slecting a ramdrive for page file, you'll have to hack that in through registry.

  10. #10
    Forum Techie A_old's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,663
    I am a bit concerned by it although I haven't tried it. Paging is only supposed to happen when an OS needs to move code or data that isn't immediately needed out of memory so needed code or data can be moved in for immediate use. I know Windows memory management isn't the best and while this will likely provide some sort of performance boost, but why not just turn off virtual memory all together to force it to use RAM? Isn't that actually better, given that the paging routines will not even have to run? I'm also concerned that there'll be some gotcha that'll cause some strangeness to happen. I'm not saying it will not work, just that I wouldn't do it. Also, you are running a 64 bit version of Windows with those 4GB, right?

  11. #11
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by Amro View Post
    I am a bit concerned by it although I haven't tried it. Paging is only supposed to happen when an OS needs to move code or data that isn't immediately needed out of memory so needed code or data can be moved in for immediate use. I know Windows memory management isn't the best and while this will likely provide some sort of performance boost, but why not just turn off virtual memory all together to force it to use RAM? Isn't that actually better, given that the paging routines will not even have to run? I'm also concerned that there'll be some gotcha that'll cause some strangeness to happen. I'm not saying it will not work, just that I wouldn't do it. Also, you are running a 64 bit version of Windows with those 4GB, right?
    Apparently totally turning off the page file causes a lot of problems, I recall hearing about that a long time ago. Things like Adobe applications die immediately if you turn off page file is what I heard.

    "I know Windows memory management isn't the best" - I think this is a candidate for understatement of the year

    The 4 Gb for me is theoretical. At home I have 1.5 Gb of RAM and at work the computers seem to be a mix of 512 MB (dual channel 2 X 256), 768 (old machines no dual channel) and 1Gb (dual channel 2 X 512). There is a guy that has 4 Gb of RAM at home so he is the potential guinea pig for any experiments I suppose. He is on XP 32 bit as far as I know, people seem to keep saying that he can't recognize the full 4 Gb of his RAM...none of which is a big deal....so maybe he has 1.75 Gb of RAM and a 1.75 Gb page file on a RAM drive. That's still plenty.

    I'm looking at this whole thing from an economics perspective. To buy the 5-10 users of our applications a bunch of RAM would cost in the neighborhood of $2000 (max). I'm sure our developers pull in at least $75/hr. Is it easier to throw a ton of RAM at the machine, or is it easier to expect that 30 hours of developer time would solve the problem? Right now I'm siding with the RAM solution simple because of your statement earlier "I know Windows memory management isn't the best". We would be asking developers to maximize something that even at the best of times can't be relied on!

  12. #12
    Forum Techie A_old's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,663
    Quote Originally Posted by purecomedy View Post
    Apparently totally turning off the page file causes a lot of problems, I recall hearing about that a long time ago. Things like Adobe applications die immediately if you turn off page file is what I heard.

    "I know Windows memory management isn't the best" - I think this is a candidate for understatement of the year

    The 4 Gb for me is theoretical. At home I have 1.5 Gb of RAM and at work the computers seem to be a mix of 512 MB (dual channel 2 X 256), 768 (old machines no dual channel) and 1Gb (dual channel 2 X 512). There is a guy that has 4 Gb of RAM at home so he is the potential guinea pig for any experiments I suppose. He is on XP 32 bit as far as I know, people seem to keep saying that he can't recognize the full 4 Gb of his RAM...none of which is a big deal....so maybe he has 1.75 Gb of RAM and a 1.75 Gb page file on a RAM drive. That's still plenty.

    I'm looking at this whole thing from an economics perspective. To buy the 5-10 users of our applications a bunch of RAM would cost in the neighborhood of $2000 (max). I'm sure our developers pull in at least $75/hr. Is it easier to throw a ton of RAM at the machine, or is it easier to expect that 30 hours of developer time would solve the problem? Right now I'm siding with the RAM solution simple because of your statement earlier "I know Windows memory management isn't the best". We would be asking developers to maximize something that even at the best of times can't be relied on!
    I guess I'm saying your developers should be able to cache things without needing several gigabytes of memory and I highly recommend you test this solution before deploying it in a production environment as I just don't think it's going to be as peachy as everyone thinks it is -- I think things are going to puke all over themselves in interesting ways.

    Also, who cares about Adobe apps if the systems are simply spec'd to run this application (making an assumption here as anything that needs that sort of data in memory better be running on its own box)? One shouldn't need to cache 2GBs of stuff in a data structure -- that's asking for hurt and inefficiency, depending on the data structure. I'm sure they're smart enough to make sure all copies of the data are up to date -- I don't know the requirements of the application so I'll shut up but I'd hope one would be using a database at that point.

    Vista's much better about its memory usage, btw, so you might give that a shot to see if it's any better for your application. "Empty RAM is wasted RAM" comes to mind. Of course I can't say whether or not the RAM drive idea will fail since I haven't tried it, I just think there are going to be some major side effects, at least.

    You have some expensive developers at $144k each, . All senior level guys with a lot of experience, I take it.

    You're correct on the 32 bit OS w/ 4GB thing. 4GB is the maximum addressable amount of memory in a 32 bit operating system (just b/c addressing is done w/ 32 bit values). I believe that 32 bit Windows (if the page file is turned on) will only "see" 3GB of memory.

    Let me see if I can rephrase the prior post -- I think putting the page file in a RAM disk completely defeats the purpose of having a page file.

    Edit: I am assuming this is a client application and not a server application, correct?
    Last edited by A_old; 06-23-07 at 12:23 PM.

  13. #13
    Forum Techie A_old's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,663
    Hey pure, have you thought of using something like the gigabyte iram? I think it's a better solution, by a long shot, if you want to speed up page file stuff in general.

    http://www.gigabyte.com.tw/Products/...ProductID=2180

    I still (highly) recommend against trying to put 2GBs of data in cache for a desktop application. I think it's horrible design (I guess this is a generalization that might not hold since I don't know much about the application, but by and large it's true).
    Last edited by A_old; 06-23-07 at 12:17 PM.

  14. #14
    Forum Techie A_old's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,663
    Can you give any more information on the application? Are there concurrent users? How many? Why are you trying to cache so much locally? Is it used over a local network or the internet?

  15. #15
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by Amro View Post
    I guess I'm saying your developers should be able to cache things without needing several gigabytes of memory and I highly recommend you test this solution before deploying it in a production environment as I just don't think it's going to be as peachy as everyone thinks it is -- I think things are going to puke all over themselves in interesting ways.
    No question, it is possible to program this better. The psychology behind all of this is that there is tons of work going forward and the developers and project manager think it is more interesting or higher priority to move forward onto something else. Meanwhile I'm more of an analyst/user who is looking at a hard drive that is thrashing thinking that we should address performance right now.

    Quote Originally Posted by Amro View Post
    Also, who cares about Adobe apps if the systems are simply spec'd to run this application (making an assumption here as anything that needs that sort of data in memory better be running on its own box)? One shouldn't need to cache 2GBs of stuff in a data structure -- that's asking for hurt and inefficiency, depending on the data structure. I'm sure they're smart enough to make sure all copies of the data are up to date -- I don't know the requirements of the application so I'll shut up but I'd hope one would be using a database at that point.
    I'm thinking if you try to even read a PDF file, you crash. That would be pretty hard to put up with.

    Quote Originally Posted by Amro View Post
    Vista's much better about its memory usage, btw, so you might give that a shot to see if it's any better for your application. "Empty RAM is wasted RAM" comes to mind. Of course I can't say whether or not the RAM drive idea will fail since I haven't tried it, I just think there are going to be some major side effects, at least.
    So that is one thing gained from Vista. So many people are saying that they hate Vista. I have never tried it myself (I know my workplace won't cut over for a while either).

    Quote Originally Posted by Amro View Post
    You have some expensive developers at $144k each, . All senior level guys with a lot of experience, I take it.
    I'd say senior is about accurate, this term opens a whole new discussion for me. To some senior is 10 years experience, yet most senior management has 30+ years experience. Programming is so different, you don't want 30 years experience you really want the 10 years experience developer that is still hungry, works till 2 am playing with computers etc. That's sort of what we have. The other thing, these are all consultants which pretty much ups the cost by 30% to start. Then our company insists that the consultants go through a consulting company which I'm sure tacks on $10/hour. Because of that I think $75/hr was conservative. I'm talking $Cdn currency (although only about 5% off the $US now) and this is Western Canada with an extremely hot job market right now.

    Quote Originally Posted by Amro View Post
    Let me see if I can rephrase the prior post -- I think putting the page file in a RAM disk completely defeats the purpose of having a page file.
    If Windows knew how to manage memory you are correct. Because it pages to a slow hard disk too aggressively, I'm contending that a page file in a RAM disk would be an improvement. A few other posters have confirmed it which is what really counts. Us discussing it is just conjecture, the proof is in the pudding!


    Quote Originally Posted by Amro View Post
    Edit: I am assuming this is a client application and not a server application, correct?
    I believe there is an Oracle database, some kind of "business server" and then the client machines. I think it's 3 tier, pretty much all .Net and Java development have been going this way for like 5 years.

  16. #16
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by Amro View Post
    Hey pure, have you thought of using something like the gigabyte iram? I think it's a better solution, by a long shot, if you want to speed up page file stuff in general.

    http://www.gigabyte.com.tw/Products/...ProductID=2180

    I still (highly) recommend against trying to put 2GBs of data in cache for a desktop application. I think it's horrible design (I guess this is a generalization that might not hold since I don't know much about the application, but by and large it's true).
    About $200 for the product and $400 for the RAM. Surprised how much more DDR RAM costs than DDR2 RAM. Maybe the i-RAM will make a DDR2 version of that card simply to take advantage of the cheaper memory (also faster)!

  17. #17
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    Quote Originally Posted by Amro View Post
    Can you give any more information on the application? Are there concurrent users? How many? Why are you trying to cache so much locally? Is it used over a local network or the internet?
    Application is essentially a combination of data capture for volume sold and then invoicing customers. The contracts are complex. We are maybe 25% done the part of capturing volume sold and we are already seeing high memory/pagefile usage. The application is a "thick client"...not a web application.

    One of the main issues is that you open a screen and close a screen and don't seem to get your resources back. You start using high resources, close all screens, open a new screen and you don't see the system "garbage collection" freeing up resources for the new screens that have a legitimate need.

    Concurrent users: 5 max. In testing you can get this problem when you are the only user in the system. The problem is on the client machine.

    Caching locally: We take a small hit when the initial screen is loaded by caching the data on load. Then everything is fast.

    Network: Yes, older computers on a 10/100 line because NIC is old. New computers have Gigabit LAN.

    A developer told me if he ran the client on the business server that the screens loaded faster. He never did tests to see if he could max out the RAM and pagefile. I imagine the business server is quite new (faster CPU) and has lots of RAM (2 Gig or something).

  18. #18
    Forum Techie A_old's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,663
    I see. So there IS a server that does the DB interaction and forwards that to the clients. I understand this isn't a webapp, but I'd recommend caching at the server and letting the clients retrieve fresh data from there. I guess the reason I think that's better is you don't run the risk of having to fetch new data to 4 other machines when the 5th updates something. It's more than just caching on the server and sending once when the clients need it.

    Anyway good luck with it.

  19. #19
    Cabledude Avatar Fan purecomedy's Avatar
    Join Date
    Feb 2000
    Location
    Canada
    Posts
    1,350
    I thought it was worth mentioning that I have tried changing the setting for DisablePagingExecutive and it hardly changes page file usage at all.

    I've tried this on multiple home PCs and office PCs.

    Anyone else have the same sort of experience with this setting?

  20. #20
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,336
    One of the main issues is that you open a screen and close a screen and don't seem to get your resources back. You start using high resources, close all screens, open a new screen and you don't see the system "garbage collection" freeing up resources for the new screens that have a legitimate need.
    This is not an operating system problem! Nor a memory problem, nor a pagefile problem. It is exclusively a problem w/ the software code. All database applications are memory intensive, including server side databases. However, the db queries can be built efficiently so as to use less resources. It would be a hundred times more efficient to utilize a server db w/ client interfaces. If you have such resource issue w/ only a small percentage of the application built thus far then the final product will be unusable, period. It means the base code is no good and needs to be rewritten more efficiently, no matter thye programming languages being used.
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

Similar Threads

  1. Umm how does it work?
    By Rivas in forum Console Gaming
    Replies: 17
    Last Post: 05-11-07, 12:27 AM
  2. Please new to dsl and already having problem
    By weedancer in forum General Broadband Forum
    Replies: 46
    Last Post: 03-09-07, 05:23 PM
  3. Problems with NERO
    By Qui-Gon John in forum Software Forum
    Replies: 6
    Last Post: 11-05-06, 04:58 PM
  4. CD Burner Problems
    By SupaSizeMe07 in forum Hardware & Overclocking
    Replies: 0
    Last Post: 07-18-06, 08:03 PM
  5. BF2 demo readme file
    By Tpofa in forum Gaming
    Replies: 1
    Last Post: 06-10-05, 05:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •