It sounds like, given your use case, you have plenty of memory but limited hard disk space. If this is correct, I would guess you made the right decision;-))
One should definitely use a persistence library instead of concatenating strings to help mitigate the possibilities of being victim of SQL injections. They are pretty good at it. Hibernate is a widely used one.
Of course, if you want real time, any operation has to execute always in the same amount of time. I would suggest using a real time OS.
In the mean time, I remain convinced that setting up a swap space concurs with making the most efficient use of my resources, as it is probably the case for most users and most use cases. You can fine tune the swappiness level which is by default 60 on most distros. I never felt the need to change the 60 default value although.
I am sure Bjørn Lomborg is paid by oil companies...
I am kidding of course. I watched the following video presentation the other day. It seemed credible and in line with what you are saying, the guy doesn't deny climate is warming:
> he does it without scanning the downloaded files or researching the reliability of the publisher
Is this what my nephew meant last week ?
He talked to me about mj55 verifying sums and computerized signature to assure that all the nice free programs I download aren't viruses but I did not quite get everything...
Can you please confirm that my system has swapped a large amount of anonymous pages e.g. ~449 MB. I am very curious about this.
Please also note that my system uses ~2792 MB of buffer/cache as shown in the free output linked below. My conclusion is that since the system uses ~2792 MB of buffer/cache, it didn't swap ~449 MB of data because it was tight on memory. It would have regained memory for the buffer/cache memory before that.
My understanding is also that if I didn't have a swap partition the ~449 MB swapped out would need to be subtracted from the~2792 MB of buffer/cache the system is using, thus having the system work with less buffer/cache.
So in my case, it seems my system DOES put stuff in the swap space and this is what I have been used to see for quite a while.
> Although I do have about a gig of cached stuff right now.
I would say this is about the minimum to maintain good performance on your system (4 GB system you said) if all your memory is in use. When you run low on buffer/cache usage and that all your memory is used, it means that your are tight on memory.
I had a customer which did not believe he needed to put more memory on his server because it was barely swapping at all. His server could barely use any buffer/cache memory although. He doubled the memory on his server and the machine was able to handle 5 to 10 times more load;-))
80% or more of your memory used as buffer/cache is great on web servers in order to boost performance.
It depends on the application you are running although. It is mostly related to how much disk content you access. If you access more disk content than your total memory, all your spare memory is going to end up as buffer/cache.
All you have to do is run a webserver (no GUI programs) with ~4 GB of content that get accessed to end up using all your memory on a 4 GB machine.
Rsync processes to back up all your disk content are pretty good at it too. Heck, maybe copying a few very large files would do the same.
> but that has a lot to do with having way too many tabs open > in 2 Firefox instances and 1 Mozilla instance.
This has nothing to do with buffer/cache usage. Have you tried running "free" on your machine ? It should speak by itself...
You, sir. misunderstand the basic concepts of an OS and thus the relevance of setting up a swap space.
Swap is used by my machine to swap out process that I haven't used for days as well as part of processes that haven't accessed the swapped part of their memory for days. I almost have no swap activity (exchange between disk swap and memory).
I am grateful that Linux is smarter than you seem to be, it figured out that it was more efficient to swap out those process and to regain the memory to use it as buffer/cache.
My system would run fine without a swap space, it would just run less efficiently, with less buffer/cache.
> I see you have like 2GB of swap, haha (moron). Your machine would grind to a halt thrashing the disks if you swapped out that much memory.
2 GB is the correct size for my setup to allow a safety margin for memory leaks and what not and to maintain an optimal amount of buffer/cache at all times. Linux would automatically swap zombie assigned memory that isn't used anymore. As a matter of fact, it probably already has;-))
> So Einstein was the first to calculate the correct value for light bending.
And just as I said in my post, science was used to prove that he was correct.
"It was not until the late 1960s that it was definitively shown that the amount of deflection was the full value predicted by general relativity, and not half that number."
I have encountered people on/. that would like to put memory chips in their machine without having the OS touch it. We need to write a FAQ about this.;-)
No disk activity is required to flush read buffer/caches. A little might be needed to flush write cache but read cache should be flushed first if memory is required by programs.
Anyway, most of the cache is read cache since write cache are flushed at regular interval.
Short story, no, no disk activity is required.
You will only have a lot of swapping if you do not have enough memory to run your programs, not because of buffer/cache usage. Before you start to have a lot of swap activity, your buffer/cache usage will go to zero anyway;-))
Basically, if you do not have any buffer/cache usage on your system, it is probably because your are tight on memory.
Yep, same for Linux. My Linux boxes use ALL the memory available even if I do not run many applications on it. The left over memory SHOULD be used as buffers/cache. If Windows 7 seems to use more memory from a newbie point of view, it might be because it does things like it should better than previous versions. I can't tell for sure since I have never tried win 7.
See this 4 GB Linux machine below, it only has ~49 MB of "absolutely free" memory and uses ~449 MB of swap.
In realty, it has ~2842 MB of "available memory" since it uses ~2792 MB of buffer/cache.
Using buffer/cache makes the system order of magnitude faster. If programs need that memory, the OS will give to them and use less buffer/cache.
> Raid 0,1 and 0+1 are normally set up in the bios,
Maybe he was referring to software Raid.
I know for sure winXP media center does not allow you to do mirroring software Raid. It took me a while to understand why I could see the the mirroring check box but that it was grayed out.
After going to MS site, I found out that you need a more expensive edition in order to do this !;-)
Seem like there is no change with regard to this in Win 7 according to GP. So, if you need mirroring, buy a raid card or buy a more expensive version of Windows.
But it was my first thought. It is amazing how people used to Windows react the first time they use a Linux desktop. Also, note that Linux distros have to offer desktop managers that look like Windows in order to ease the transition.
Let's face it, right now, for most people Windows is synonym of desktop computer and they learn that concept early in their life now.
So for most people, Windows fits the task and they are not interested in learning something else, it just isn't a priority for them and they would rather spend their time doing something else.
About attaching a few pulling ropes typically about twice the required length to the coax wire. This way you would always have pulling ropes around. Twice the required length so you can pull them back if you need to.
That's typically what I have seen in big buildings.
Of course, we take for granted that his coax cables are installed in a way so they can be used as fishers;-))
> I think you just reinvented the principle of marginal gains in utility of information gathering. It's in every Microeconomy 101
Basic principles are sometimes expressed differently form one field of activity to another. When you encounter the same principle expressed differently, the spirit of the principle becomes some kind of "meta-principle" and the specific definition made in every field become application of the "meta-principle". This is usually a sign that the principle is valid !;-))
So, I didn't invent anything, I might have expressed it slightly differently if anything.
I am not suggesting anything, I even said that it was OK to innovate re-invent in some circumstance. And if one really thinks that he can innovate, he should go for it, that's what we call progress;-)
I perceived Google algorithm like something very innovative and I wouldn't have guessed that it was based on such an old concept so I thought that it was appropriate to write about it.
We all like to re-invent and innovate, it is human nature and I am no exception.
Don't you find it amusing that Google used such an old concept and wouldn't have you been tempted to say: Google developers didn't invent the basis of the algorithm so there not as smart as we thought they were with their fancy algorithm ?
I thought that it was appropriate to mention that sometimes re-using is smart !;-))
I also noted that I witnessed several failures when people tried to re-invent something that already existed so in my humble opinion, it never hurts to restate basic IT principles when we see an example where they were applied.;-)
It sounds like, given your use case, you have plenty of memory but limited hard disk space. If this is correct, I would guess you made the right decision ;-))
One should definitely use a persistence library instead of concatenating strings to help mitigate the possibilities of being victim of SQL injections. They are pretty good at it. Hibernate is a widely used one.
Of course, if you want real time, any operation has to execute always in the same amount of time. I would suggest using a real time OS.
In the mean time, I remain convinced that setting up a swap space concurs with making the most efficient use of my resources, as it is probably the case for most users and most use cases. You can fine tune the swappiness level which is by default 60 on most distros. I never felt the need to change the 60 default value although.
I am sure Bjørn Lomborg is paid by oil companies...
I am kidding of course. I watched the following video presentation the other day. It seemed credible and in line with what you are saying, the guy doesn't deny climate is warming:
http://www.mininova.org/search/?search=Catastrophe+Denied&cat=0
Anybody cares to give background on the author ?
> he does it without scanning the downloaded files or researching the reliability of the publisher
Is this what my nephew meant last week ?
He talked to me about mj55 verifying sums and computerized signature to assure that all the nice free programs I download aren't viruses but I did not quite get everything...
> The issue is, as always, EDUCATE THEM.
If everybody was well educated in all spheres of life, we would live in a perfect world ! ;-)
"EDUCATE THEM" as a solution sometimes seems to me like utopia.
I am really sorry to say that. Of course, trying to educate people is a noble cause but sometimes it is a hard task to fulfill.
> the money system is such a joke. one day it will break... mark my words.
Well if it does, maybe this will be an important contributor: ;-)
http://en.wikipedia.org/wiki/Peak_oil
The problem with the modern economy is that it is based on perpetual growth. We might find a way to adapt, hopefully.
Can you please confirm that my system has swapped a large amount of anonymous pages e.g. ~449 MB. I am very curious about this.
Please also note that my system uses ~2792 MB of buffer/cache as shown in the free output linked below. My conclusion is that since the system uses ~2792 MB of buffer/cache, it didn't swap ~449 MB of data because it was tight on memory. It would have regained memory for the buffer/cache memory before that.
My understanding is also that if I didn't have a swap partition the ~449 MB swapped out would need to be subtracted from the~2792 MB of buffer/cache the system is using, thus having the system work with less buffer/cache.
So in my case, it seems my system DOES put stuff in the swap space and this is what I have been used to see for quite a while.
http://slashdot.org/comments.pl?sid=1557492&cid=31212938&art_pos=11&art_pos=11
Thanks,
> Although I do have about a gig of cached stuff right now.
I would say this is about the minimum to maintain good performance on your system (4 GB system you said) if all your memory is in use. When you run low on buffer/cache usage and that all your memory is used, it means that your are tight on memory.
I had a customer which did not believe he needed to put more memory on his server because it was barely swapping at all. His server could barely use any buffer/cache memory although. He doubled the memory on his server and the machine was able to handle 5 to 10 times more load ;-))
80% or more of your memory used as buffer/cache is great on web servers in order to boost performance.
> Really?
Yes really.
It depends on the application you are running although. It is mostly related to how much disk content you access. If you access more disk content than your total memory, all your spare memory is going to end up as buffer/cache.
All you have to do is run a webserver (no GUI programs) with ~4 GB of content that get accessed to end up using all your memory on a 4 GB machine.
Rsync processes to back up all your disk content are pretty good at it too. Heck, maybe copying a few very large files would do the same.
> but that has a lot to do with having way too many tabs open
> in 2 Firefox instances and 1 Mozilla instance.
This has nothing to do with buffer/cache usage. Have you tried running "free" on your machine ? It should speak by itself...
> never needed swap space.
You, sir. misunderstand the basic concepts of an OS and thus the relevance of setting up a swap space.
Swap is used by my machine to swap out process that I haven't used for days as well as part of processes that haven't accessed the swapped part of their memory for days. I almost have no swap activity (exchange between disk swap and memory).
I am grateful that Linux is smarter than you seem to be, it figured out that it was more efficient to swap out those process and to regain the memory to use it as buffer/cache.
My system would run fine without a swap space, it would just run less efficiently, with less buffer/cache.
http://slashdot.org/comments.pl?sid=1557492&cid=31213314&art_pos=5
> I see you have like 2GB of swap, haha (moron). Your machine would grind to a halt thrashing the disks if you swapped out that much memory.
2 GB is the correct size for my setup to allow a safety margin for memory leaks and what not and to maintain an optimal amount of buffer/cache at all times. Linux would automatically swap zombie assigned memory that isn't used anymore. As a matter of fact, it probably already has ;-))
According to you own link:
> So Einstein was the first to calculate the correct value for light bending.
And just as I said in my post, science was used to prove that he was correct.
"It was not until the late 1960s that it was definitively shown that the amount of deflection was the full value predicted by general relativity, and not half that number."
I thought it was for confirming the not so obvious things like the curving of light predicted by Einstein ;-))
Isn't it obvious that the fear of something will have an impact even on the simplest things where something relative to that fear is involved ?
I have encountered people on /. that would like to put memory chips in their machine without having the OS touch it. We need to write a FAQ about this. ;-)
http://tech.slashdot.org/comments.pl?sid=1557492&cid=31213314
> I regularly bump up against my 2GB ram limit
I ALWAYS bump up against my 4GB ram limit and it is perfectly normal ! ;-)))
The shit you "leave open" will be swapped out, so there is no problem there either....
I currently have 355 processes running on my system; 51 bash shells, 33 httpd, 65 rotatelogs, 3 XVNC server, 3 VMWare hosts, etc...
And it all runs as smooth as a baby as long as you do not try to use ALL the processes at once ;-))
http://slashdot.org/comments.pl?sid=1557492&cid=31212938&art_pos=2
http://slashdot.org/comments.pl?sid=1557492&cid=31213022&art_pos=1
http://slashdot.org/comments.pl?sid=1557492&cid=31213096
Programs and compilers have nothing to do with disk read/write caches, this is handled at the OS level.
Programs ask to read/write from/to disk and they have no idea where the OS get the data from.
You and the GP might be confusing CPU cache that has its own dedicated memory and disk cache that uses the OS RAM.
No disk activity is required to flush read buffer/caches. A little might be needed to flush write cache but read cache should be flushed first if memory is required by programs.
Anyway, most of the cache is read cache since write cache are flushed at regular interval.
Short story, no, no disk activity is required.
You will only have a lot of swapping if you do not have enough memory to run your programs, not because of buffer/cache usage. Before you start to have a lot of swap activity, your buffer/cache usage will go to zero anyway ;-))
Basically, if you do not have any buffer/cache usage on your system, it is probably because your are tight on memory.
Yep, same for Linux. My Linux boxes use ALL the memory available even if I do not run many applications on it. The left over memory SHOULD be used as buffers/cache. If Windows 7 seems to use more memory from a newbie point of view, it might be because it does things like it should better than previous versions. I can't tell for sure since I have never tried win 7.
See this 4 GB Linux machine below, it only has ~49 MB of "absolutely free" memory and uses ~449 MB of swap.
In realty, it has ~2842 MB of "available memory" since it uses ~2792 MB of buffer/cache.
Using buffer/cache makes the system order of magnitude faster. If programs need that memory, the OS will give to them and use less buffer/cache.
free
total used free shared buffers cached
Mem: 4133252 4083380 49872 0 26852 2766248
-/+ buffers/cache: 1290280 2842972
Swap: 1999800 449244 1550556
> Raid 0,1 and 0+1 are normally set up in the bios,
Maybe he was referring to software Raid.
I know for sure winXP media center does not allow you to do mirroring software Raid. It took me a while to understand why I could see the the mirroring check box but that it was grayed out.
After going to MS site, I found out that you need a more expensive edition in order to do this ! ;-)
Seem like there is no change with regard to this in Win 7 according to GP. So, if you need mirroring, buy a raid card or buy a more expensive version of Windows.
> I am confused and frustrated by your post.
Sorry about that.
But it was my first thought. It is amazing how people used to Windows react the first time they use a Linux desktop. Also, note that Linux distros have to offer desktop managers that look like Windows in order to ease the transition.
Let's face it, right now, for most people Windows is synonym of desktop computer and they learn that concept early in their life now.
So for most people, Windows fits the task and they are not interested in learning something else, it just isn't a priority for them and they would rather spend their time doing something else.
Hence, start early, give it to newborns ;-))
Give it to newborns before they get intoxicated be anything else.
> The BBC is carrying a report on how people confused and frustrated by computers can now turn to...
Those people might already suffer from permanent damages from using what they are using now.... ;-))
About attaching a few pulling ropes typically about twice the required length to the coax wire. This way you would always have pulling ropes around. Twice the required length so you can pull them back if you need to.
That's typically what I have seen in big buildings.
Of course, we take for granted that his coax cables are installed in a way so they can be used as fishers ;-))
> I think you just reinvented the principle of marginal gains in utility of information gathering. It's in every Microeconomy 101
Basic principles are sometimes expressed differently form one field of activity to another. When you encounter the same principle expressed differently, the spirit of the principle becomes some kind of "meta-principle" and the specific definition made in every field become application of the "meta-principle". This is usually a sign that the principle is valid ! ;-))
So, I didn't invent anything, I might have expressed it slightly differently if anything.
> But are you seriously suggesting that Brin
I am not suggesting anything, I even said that it was OK to innovate re-invent in some circumstance. And if one really thinks that he can innovate, he should go for it, that's what we call progress ;-)
I perceived Google algorithm like something very innovative and I wouldn't have guessed that it was based on such an old concept so I thought that it was appropriate to write about it.
We all like to re-invent and innovate, it is human nature and I am no exception.
Don't you find it amusing that Google used such an old concept and wouldn't have you been tempted to say: Google developers didn't invent the basis of the algorithm so there not as smart as we thought they were with their fancy algorithm ?
I thought that it was appropriate to mention that sometimes re-using is smart ! ;-))
I also noted that I witnessed several failures when people tried to re-invent something that already existed so in my humble opinion, it never hurts to restate basic IT principles when we see an example where they were applied. ;-)