AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > AnimeSuki & Technology > Tech Support

Notices

Reply
 
Thread Tools
Old 2007-08-14, 13:36   Link #41
TakutoKun
Mew Member
*IT Support
 
 
Join Date: Aug 2007
Location: Ontario, Canada
Age: 29
Quote:
Originally Posted by grey_moon View Post
I was thinking of a situation with 3GB on my home server and when I had XP on it, just booting it up the swap file would be already used. Now with linux, only when I push it with virtual machines does the swap get used. XP imho likes to use the swap file was the point I was trying to make.
The general rule for the use of the page file (swap file) is to allow for a temporary place to place information before processing (RAM -> CPU). However, I think that Windows XP seems to prefer the use of the pagefile - for pre-allocations. I think that the only real way to reducing the use of the page file would be to set it to zero and run your XP system under core RAM.

I found this wonderful quote on in a Newsgroup:

"It is only when the actual memory usage exceeds the available RAM that it
is necessary for the Memory Manager to identify inactive items in RAM that
can be moved to the page file so that RAM can be used for other things. At
that point some actual disk writing will occur and the performance slowed
accordingly. But at that point the alternatives are such things as
application or system crashes due to "out of memory" and I think almost
anyone would prefer to see a little disk usage rather than that. " - http://groups.google.ca/group/micros...1785c5a45ce3dc

It seems that there are quite a few theories on why Windows XP *must* have a page file. I suppose Linux/Unix systems are better in this area as they only use the swap when required.
TakutoKun is offline   Reply With Quote
Old 2007-08-14, 16:20   Link #42
arcadeplayer987
Senior Member
 
Join Date: Apr 2007
We should send this question to Myth Busters
__________________

www.arcadebuilder.net - The Best Arcade Script. Own your own arcade website today
arcadeplayer987 is offline   Reply With Quote
Old 2007-08-14, 22:39   Link #43
hobbes_fan
You could say.....
 
 
Join Date: Apr 2007
Well unless they blow the pc up it'd be pretty unwatchable. Might see if the CSIRO has a research paper.
hobbes_fan is offline   Reply With Quote
Old 2007-08-14, 23:58   Link #44
grey_moon
Yummy, sweet and unyuu!!!
 
 
Join Date: Dec 2004
LOL @arcadeplayer987 & hobbes_fan

@matradley - Pre-allocation does ring a bell. I remember it is one of the reasons why disabling the swap file actually makes your memory usage less efficient. Since the OS needs to pre-allocate some memory, it means that without a swap file present, the OS will not use 100% of the memory as some of it has been reserved.

Doesn't the nix type systems act like Windows setup in server mode and reserve all the memory for system usage? I guess it is to do with how the OS is setup.
__________________
grey_moon is offline   Reply With Quote
Old 2007-08-15, 01:36   Link #45
Tiberium Wolf
Senior Member
 
 
Join Date: Dec 2004
Location: Portugal
Age: 34
For non critical systems like home pcs we should disable the swap file. The memory is cheap nowadays. Buy enough mem for your needs and disable the swap file. Is better to have ns access than ms access... besides you reduce the HDD activity by a lot!!!

Currently I have 2 GB of ram and since I don't use more than 1.7 GB I can turn off swap. No more unnecessary HDD writing. All stay in the ram.



About the fragmentation. No matter what file system there will be always fragmentation. How much will it have? It depends on what activity is the HDD having. For example I think the best would be a program doing some sort of defrag whenever the computer is idle. Like putting all files contiguously in HDD maximizing the the free blocks. If there is a free block smaller than a X size then push the closest data to close that free block. That would assure you that your HDD would have the biggest free blocks whenever possible. Of course then your HDD activity would go sky high buy the count at the end of the day.
__________________
Tiberium Wolf is offline   Reply With Quote
Old 2007-08-15, 03:23   Link #46
Sephi
Thinking outside the box
*Graphic Designer
 
 
Join Date: May 2007
Location: The Netherlands
Age: 27
Quote:
Originally Posted by Tiberium Wolf View Post
For non critical systems like home pcs we should disable the swap file. The memory is cheap nowadays. Buy enough mem for your needs and disable the swap file. Is better to have ns access than ms access... besides you reduce the HDD activity by a lot!!!

Currently I have 2 GB of ram and since I don't use more than 1.7 GB I can turn off swap. No more unnecessary HDD writing. All stay in the ram.



About the fragmentation. No matter what file system there will be always fragmentation. How much will it have? It depends on what activity is the HDD having. For example I think the best would be a program doing some sort of defrag whenever the computer is idle. Like putting all files contiguously in HDD maximizing the the free blocks. If there is a free block smaller than a X size then push the closest data to close that free block. That would assure you that your HDD would have the biggest free blocks whenever possible. Of course then your HDD activity would go sky high buy the count at the end of the day.
I heard swap file is needed to run some program. I read somewhere that photoshop won't even work if you disable swap file. (haven't tested it myself... since i cba rebooting ) Also heard swap file is needed in case the memory makes a mistake of some sort. Can't remember the exact details. But i googled a bit when i wanted to disable my swap file. Though after reading i decided not to.

And i don't think the way you mention about defrag would be effective. I thought the point of defrag is locating a file as close as possible. At your way you just closes gaps to make it look nice. But if your 500mb file is spreaded out to much, it will still have to move the thing up and down a lot to read it so you still lose performance/time. I think it has to move the complete file next to each other. Instead of grabbing for closes data that fits in the block.
__________________

Currently watching: Aria the Origination & Dennou Coil
Sephi: Anime Icons | Signatures & Avatars | Renders
Sephi is offline   Reply With Quote
Old 2007-08-15, 05:52   Link #47
Tiberium Wolf
Senior Member
 
 
Join Date: Dec 2004
Location: Portugal
Age: 34
Quote:
Originally Posted by Sephi View Post
I heard swap file is needed to run some program. I read somewhere that photoshop won't even work if you disable swap file.
Photoshop works without swap. I am using it.

Quote:
Originally Posted by Sephi View Post
And i don't think the way you mention about defrag would be effective. I thought the point of defrag is locating a file as close as possible. At your way you just closes gaps to make it look nice. But if your 500mb file is spreaded out to much, it will still have to move the thing up and down a lot to read it so you still lose performance/time. I think it has to move the complete file next to each other. Instead of grabbing for closes data that fits in the block.
I was saying to close the gaps with contiguous files(not spread out files). It's like in the windows defrag if you had all blue blocks but there were several free blocks(white) but very small. It would be in better is all data was compacted not leaving those small gaps. Those gaps in the future would lead to fragmentation.
__________________
Tiberium Wolf is offline   Reply With Quote
Old 2007-08-15, 05:57   Link #48
TakutoKun
Mew Member
*IT Support
 
 
Join Date: Aug 2007
Location: Ontario, Canada
Age: 29
Quote:
Originally Posted by Tiberium Wolf View Post
For non critical systems like home pcs we should disable the swap file. The memory is cheap nowadays. Buy enough mem for your needs and disable the swap file. Is better to have ns access than ms access... besides you reduce the HDD activity by a lot!!!

Currently I have 2 GB of ram and since I don't use more than 1.7 GB I can turn off swap. No more unnecessary HDD writing. All stay in the ram.
You will, absolutely, receive a performance loss on removing the page file in Windows. As mentioned earlier, Windows does not send pre-allocations up to RAM in the same way as it does with the page file. I tried running my computer from core RAM and I noticed a performance loss right away.

Photoshop, however, is a bit different in the way it runs. I am not an expert with Photoshop, but it is among some of the few programs that can allocate 64-bit memory more efficient than most core Windows applications.
TakutoKun is offline   Reply With Quote
Old 2007-08-15, 07:52   Link #49
Sephi
Thinking outside the box
*Graphic Designer
 
 
Join Date: May 2007
Location: The Netherlands
Age: 27
Quote:
Originally Posted by Tiberium Wolf View Post
Photoshop works without swap. I am using it.



I was saying to close the gaps with contiguous files(not spread out files). It's like in the windows defrag if you had all blue blocks but there were several free blocks(white) but very small. It would be in better is all data was compacted not leaving those small gaps. Those gaps in the future would lead to fragmentation.
Was a misunderstanding of me than. I assume any random stuff since you said push the closest data to close that free block. If that would be the case it would be ineffective ^^

And meh, guess some sites are sprouting nonsense than about photoshop not working. I still got my pagefile enabled though, i disabled it for a short time before, but since i didn't notice a difference i just enabled it again to be on the save side.

But uhu since you mentioned not using swap files. Do you notice a performance gain? Or any advantage at all?
__________________

Currently watching: Aria the Origination & Dennou Coil
Sephi: Anime Icons | Signatures & Avatars | Renders
Sephi is offline   Reply With Quote
Old 2007-08-15, 08:24   Link #50
Tiberium Wolf
Senior Member
 
 
Join Date: Dec 2004
Location: Portugal
Age: 34
Quote:
Originally Posted by Sephi View Post
Was a misunderstanding of me than. I assume any random stuff since you said push the closest data to close that free block. If that would be the case it would be ineffective ^^

And meh, guess some sites are sprouting nonsense than about photoshop not working. I still got my pagefile enabled though, i disabled it for a short time before, but since i didn't notice a difference i just enabled it again to be on the save side.

But uhu since you mentioned not using swap files. Do you notice a performance gain? Or any advantage at all?
Yes. I do. Plus I don't hear my HDD making it's awful writing noise. I think performance should noticeable pretty fast. I mean why the hell do I need a memory that works at milisec speed while I can use a nanosec speed one? I don't go over 2 GB of used ram so I don't run the risk of a program failing.
__________________
Tiberium Wolf is offline   Reply With Quote
Old 2007-08-15, 09:00   Link #51
grey_moon
Yummy, sweet and unyuu!!!
 
 
Join Date: Dec 2004
Quote:
Originally Posted by Tiberium Wolf View Post
Yes. I do. Plus I don't hear my HDD making it's awful writing noise. I think performance should noticeable pretty fast. I mean why the hell do I need a memory that works at milisec speed while I can use a nanosec speed one? I don't go over 2 GB of used ram so I don't run the risk of a program failing.
I think to really get the best performance out of your box in terms of swap files, fragmentation etc, is to get one of those really expensive ram disks and swap to that.
__________________
grey_moon is offline   Reply With Quote
Old 2007-08-15, 09:09   Link #52
Sephi
Thinking outside the box
*Graphic Designer
 
 
Join Date: May 2007
Location: The Netherlands
Age: 27
Quote:
Originally Posted by Tiberium Wolf View Post
Yes. I do. Plus I don't hear my HDD making it's awful writing noise. I think performance should noticeable pretty fast. I mean why the hell do I need a memory that works at milisec speed while I can use a nanosec speed one? I don't go over 2 GB of used ram so I don't run the risk of a program failing.
Ah ok. Perhaps i should give it a try again. I never saw my 2gb being used yet with doing normal things. (not counting opening huge size 200 frames gif files )

And those things you mention grey_moon, you mean nand or those solid state harddisk or whatever there name is. I hope those become mainstream soon. Windows on one of those flash memories. And data on a normal hard disk. I just hate windows booting time. Saw a video of it somewhere. Windows booting in 15 seconds ready to use...
__________________

Currently watching: Aria the Origination & Dennou Coil
Sephi: Anime Icons | Signatures & Avatars | Renders
Sephi is offline   Reply With Quote
Old 2007-08-15, 10:55   Link #53
grey_moon
Yummy, sweet and unyuu!!!
 
 
Join Date: Dec 2004
Quote:
Originally Posted by Sephi View Post
Ah ok. Perhaps i should give it a try again. I never saw my 2gb being used yet with doing normal things. (not counting opening huge size 200 frames gif files )

And those things you mention grey_moon, you mean nand or those solid state harddisk or whatever there name is. I hope those become mainstream soon. Windows on one of those flash memories. And data on a normal hard disk. I just hate windows booting time. Saw a video of it somewhere. Windows booting in 15 seconds ready to use...
Hoo hoo a little more older then that, I mean the 4GB DDR PCI things. Basically they are just memory with a battery to keep the data alive. The benefit of them apart from speed is that they can take many writes which nand can't do. The problem with them is they are bleeping expensive for what u get. U need the card which is over 100 USD and then 4GB of memory which is cheaper now I guess, but not cheap compared to conventional storage.

http://www.nxsource.com/products/122...TE/GC_RAMDISK/

I remember chatting to some people about it in a linux expo. They were trying to come up with some method of "nuking" their hard drives for what ever reason. I pointed these out to them and said if you remove the battery then if any one powers it off for what ever reason it will be real hard to recover any of the data.

*edit*
Hee hee thinking about it, it is a solid state hard disk isnt it and the above example is a sata one and when I was reading up about them, they interfaced via the PCI slot.
__________________
grey_moon is offline   Reply With Quote
Old 2007-08-15, 15:14   Link #54
TakutoKun
Mew Member
*IT Support
 
 
Join Date: Aug 2007
Location: Ontario, Canada
Age: 29
Quote:
Originally Posted by grey_moon View Post
Hoo hoo a little more older then that, I mean the 4GB DDR PCI things. Basically they are just memory with a battery to keep the data alive. The benefit of them apart from speed is that they can take many writes which nand can't do. The problem with them is they are bleeping expensive for what u get. U need the card which is over 100 USD and then 4GB of memory which is cheaper now I guess, but not cheap compared to conventional storage.

http://www.nxsource.com/products/122...TE/GC_RAMDISK/

I remember chatting to some people about it in a linux expo. They were trying to come up with some method of "nuking" their hard drives for what ever reason. I pointed these out to them and said if you remove the battery then if any one powers it off for what ever reason it will be real hard to recover any of the data.

*edit*
Hee hee thinking about it, it is a solid state hard disk isnt it and the above example is a sata one and when I was reading up about them, they interfaced via the PCI slot.
That is kind of neat. It is much like a solid-state hard drive but by using RAM. The RAM is being powered so that it (they) hold memory. I wonder how long the charge is good for when powering and maintaining the charge in RAM?
TakutoKun is offline   Reply With Quote
Old 2007-08-15, 20:51   Link #55
Epyon9283
Geek
 
 
Join Date: Dec 2005
Location: New Jersey
Age: 30
Send a message via ICQ to Epyon9283 Send a message via AIM to Epyon9283
Quote:
Originally Posted by Tiberium Wolf View Post
For non critical systems like home pcs we should disable the swap file. The memory is cheap nowadays. Buy enough mem for your needs and disable the swap file. Is better to have ns access than ms access... besides you reduce the HDD activity by a lot!!!

Currently I have 2 GB of ram and since I don't use more than 1.7 GB I can turn off swap. No more unnecessary HDD writing. All stay in the ram.



About the fragmentation. No matter what file system there will be always fragmentation. How much will it have? It depends on what activity is the HDD having. For example I think the best would be a program doing some sort of defrag whenever the computer is idle. Like putting all files contiguously in HDD maximizing the the free blocks. If there is a free block smaller than a X size then push the closest data to close that free block. That would assure you that your HDD would have the biggest free blocks whenever possible. Of course then your HDD activity would go sky high buy the count at the end of the day.
Disabling the page file in Windows is terrible advice. What happens when one day you're using more RAM than you anticipated? Something is going to crash.

I have 2GB of RAM and I hit the swap pretty regularly (running OS X).

Putting all the files close together would just mean those files will fragment as soon as you write anything additional to them. Thats why some Linux file systems (ext3) put space between files. Allows them to grow without fragmenting. This only really starts to break down when theres less than 10 or 20% free space.
Epyon9283 is offline   Reply With Quote
Old 2007-08-15, 21:37   Link #56
052569
Member
 
 
Join Date: May 2006
Location: Santa Barbara, CA
I'm not an expert in this subject...but I did stay at a Holiday Inn Express last night.

Joking aside, there are really a lot of misinformation in this thread. That said, I'm not citing sources for my assertions, either; I'm too lazy. Besides, there will be plenty other people eager to point out my mistakes, so anything not overturned is probably correct...

First, no file system + free space allocation strategy could avoid fragmentation for all usage patterns. However, modern file systems are very good at reducing fragmentation, and modern OS are very good at reducing the impact of fragmented files. For example, leaving gaps between files instead of packing them tightly together may appear to promote fragmentation, but actually if you anticipate files to grow in size, then the gaps helps minimize fragmentation. In other words, unless you're using FAT, defragging HDs is a waste of time, not to mention precarious: what if power goes out in the process? Is even a 2x performance improvement worth risking your data?

One scenario that almost always triggers the worse performance is when the disk is almost full, say 90%+. The idea is that you want the performance of the disk to be relatively independent of capacity filled, for most capacity ranges. That is, the performance curve when the disk is 0% ~ 70% full should be relatively flat. The tradeoff is that once you exceed certain threshold, performance drops off rapidly.

Journaling file systems, in most cases, make no guarantee about the consistency of data. It's possible, although unlikely, that after a crash, many of your files your home directory become missing / corrupted. What won't happen is that two different files suddenly refers to the same sector on disk, or that the OS suddenly thinks your disk is twice (or half) its actual size. The goal of journaling is to maintain the consistency of the file system, because you can implement data consistency at "higher levels."

It is possible to "push down" data consistency to the file system--there's a flag to do this for ext3--but the performance tradeoff is unfavorable. To the file system, data is just a stream of bytes, so to journal a write of "abcd" is to write "abcd" in the journal. Therefore, you are essentially writing two copies of the same data, and if that's really what you want, there are better approaches, such as RAID. OTOH, each application "knows" the structure to the data written, so it can leverage the knowledge to more efficiently implement data consistency.

Now, on to swap files. Disabling swap files is a bad idea. Placing the swap file in a RAM disk is a worse idea. You are always better off having the OS manage memory for you: it's got more information to infer where the memory's needed than you do. Unless somehow you're force to use 32-bit XP--which has an effectively 3 GB memory limit--and want to utilize more RAM, leave the swap file alone.

I'm not quite convinced that running Photoshop without swap leads to better performance. While PS effectively manage its own memory, without swap the OS can't page out unused background services to disk, thus less memory is available for PS.

Alright, I think this rant has gone on long enough.

EDIT: Others have beat me to some of the points I made to the post while I'm writing.
__________________
When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute--and itís longer than any hour. Thatís relativity.
-- Albert Einstein

Last edited by 052569; 2007-08-15 at 21:39. Reason: I type too slow.
052569 is offline   Reply With Quote
Old 2007-08-15, 21:53   Link #57
grey_moon
Yummy, sweet and unyuu!!!
 
 
Join Date: Dec 2004
Quote:
Originally Posted by matradley View Post
That is kind of neat. It is much like a solid-state hard drive but by using RAM. The RAM is being powered so that it (they) hold memory. I wonder how long the charge is good for when powering and maintaining the charge in RAM?
The modern variant seems to be the Gigabyte I linked and that has a battery that can last for 10 hours, so backing up does seem like a good idea if you save important stuff to it.

@052569 - Nice post
__________________
grey_moon is offline   Reply With Quote
Old 2007-08-16, 01:01   Link #58
Tiberium Wolf
Senior Member
 
 
Join Date: Dec 2004
Location: Portugal
Age: 34
Quote:
Originally Posted by 052569 View Post
Now, on to swap files. Disabling swap files is a bad idea. Placing the swap file in a RAM disk is a worse idea. You are always better off having the OS manage memory for you: it's got more information to infer where the memory's needed than you do. Unless somehow you're force to use 32-bit XP--which has an effectively 3 GB memory limit--and want to utilize more RAM, leave the swap file alone.

I'm not quite convinced that running Photoshop without swap leads to better performance. While PS effectively manage its own memory, without swap the OS can't page out unused background services to disk, thus less memory is available for PS.
You still didn't tell us why is bad.

If you never go over the total RAM you have why do you need the swap file?

For example. You a few things opened. Now you go play a game a uses a considerable mem. Still in the overall it won't go over the total RAM you have. When you quit the game the system will be soooo slow coz it will be transferring from the swap the data of the other programs since the game ended so there is more free mem. This is 1 of the examples of what I hate the most. If you didn't have swap file there wouldn't be this unnecessary transfer.
__________________
Tiberium Wolf is offline   Reply With Quote
Old 2007-08-16, 03:41   Link #59
052569
Member
 
 
Join Date: May 2006
Location: Santa Barbara, CA
Quote:
Originally Posted by Tiberium Wolf View Post
You still didn't tell us why is bad.

If you never go over the total RAM you have why do you need the swap file?
If you know that you will never exceed the total memory capacity of your system, due to your specific usage pattern, then yes the swap file is totally useless. This is certainly one strategy in managing memory, a finite resource. However, this strategy is quite poor in general, because no process uses all its memory at once, yet that memory's tied up regardless.

I think a good analogy would be financial management. If you were born with a silver spoon, then there's no point in investing any of your money: you already have all that you'll ever need. For the rest of us who are less fortunate, keeping all the money in shoe boxes underneath our beds clearly isn't the soundest strategy. Investing some of that money will generally yield better returns.

Now, is there a "best" investment strategy that will never fail? Whatever strategy you come up with, is it likely that it'll beat the one devised by teams of economists?

Quote:
For example. You a few things opened. Now you go play a game a uses a considerable mem. Still in the overall it won't go over the total RAM you have. When you quit the game the system will be soooo slow coz it will be transferring from the swap the data of the other programs since the game ended so there is more free mem. This is 1 of the examples of what I hate the most. If you didn't have swap file there wouldn't be this unnecessary transfer.
I presume you're using XP when you experienced this, because I have similar experiences. This is an unfortunately common case where XP's memory management strategy fails, and supposedly Vista is better. The reason is because we (the users) have a different notion of "performance" than what XP has. I'm quite sure that XP strategy probably keep the memory bus filled, and thus the CPU data & instruction bus filled, so that the system is "working" more often than "idling." Of course, I could care less that the CPU spent a few million instructions less--and that's an underestimate--twiddling it's figurative thumb, if IE don't pop up the moment I click on it.

It's only recently that emphasis is put on interactivity over throughput. Obviously the latter is more important for servers, and computers has been servers far longer than "appliances." Going back to the money analogy, most investment plans assumes that you'll live until a certain age, say 75. If there's suddenly a plague that reduces the average lifespan to 45, then your investments become worthless as you'll not live to see it.
__________________
When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute--and itís longer than any hour. Thatís relativity.
-- Albert Einstein
052569 is offline   Reply With Quote
Old 2007-08-16, 03:47   Link #60
Ledgem
Love Yourself
 
 
Join Date: Mar 2003
Location: Northeast USA
Age: 28
Quote:
Originally Posted by Tiberium Wolf View Post
If you never go over the total RAM you have why do you need the swap file?
What if a program enters a loop or misbehaves in some other form? I've had my RAM sucked down to barely anything while the page file grew to gigabytes in size during instances like that. System slowdown was only fixable by terminating the program. If your RAM is exceeded (whether intentionally or not), is it recoverable, or do you get a blue screen/freeze? Depending on what you use your computer for, that might be an OK risk to take, of course. But for people who can't afford unscheduled reboots/downtime, a page file would provide a stability layer.
__________________
Ledgem is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 00:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
We use Silk.