Virtual memory is exactly what it sounds like, fake memory. A simple example is, say you have 4 MB of memory and you want to run 5 programs each needing 1 MB of memory. When you run the 5th program the operating system takes 1 MB of memory that hasn't been used in a while and writes it to the hard drive. This frees up the memory allowing the 5th program to run. Now if another program requests the memory that is on disk, the operating system has to swap something with it. This is slow. For most users, the operating system manages it and you never have to think about it. Virtual memory is great and it's allowed people to multitask easier without having to worry about memory. But....
Memory is so incredibly cheap these days, I recently upgraded to 8GB of memory and turned off virtual memory my pagefile. My thinking is before I had 4GB of memory and a 4GB pagefile and my system ran great. Now that I have 8GB I shouldn't need virtual memory a pagefile. Why not have both? Windows is notorious of being a memory hog, the more there is, the more it uses. Disabling virtual memory the pagefile is the only way to force windows and other programs to use only physical memory. Have you ever heard your hard drive spin up when switching programs? Not me anymore!
UPDATE: I used a very layman use of the term virtual memory because my point was the hard drive swapping. In reality virtual memory does a lot more than just swap data from the RAM to the hard drive. It allows applications to use contigous memory when it actually may be fragmented or across various media. This is very important and cannot be turned off. Turning off the pagefile will prevent any harddrive swaps but if I ever do use my entire 8GB of ram, I might have some performance issues. Does disabling the pagefile help? I would assume that windows trys to leave some free memory for applications so it doesn't always need to swap and disabling the pagefile may increase the amount of physical memory left unallocated. With a lot of RAM it probably doesn't make much of a difference either way. In practice my system is running great but I haven't done any strenuous testing.
Saturday, November 15, 2008
No more virtual memory!
Posted by
Jesse Mandel
at
7:51 PM
2
comments
Links to this post
Labels: virtual memory
Monday, June 30, 2008
Birthday Skydiving!
I went skydiving for my 26th birthday this past weekend! It was pretty intense but not too scary. I kept thinking I'd get nervous the closer I came to jumping but I was so excited and on such an adrenaline rush it never happened. I was also surprised that I didn't feel the stomach lurching feeling you get from roller coasters and such. I felt it for only a split second when I jumped out but then it's just a weightless, floating sensation. I definitely encourage everyone to try it!
Posted by
Jesse Mandel
at
9:47 AM
1 comments
Links to this post
Friday, May 23, 2008
New Weezer Album
As many of you may know, Weezer is my favorite band. In eleven days (June 3 2008) they are releasing their next album, "Weezer". It will their third self titled album, this time nicknamed "The Red Album".
The video for their single, "Pork and Beans", came out on YouTube today! If you keep up on the internet's viral videos, you'll find it pretty funny.
Below is a list of videos I compiled that are included (in order of first appearance):
- One Man Band
- Rogaine?
- Dramatic Chipmunk
- Nunchucks Pro
- Eepybird
- Cartoon Muscle Man?
- Guiness World Record for most T-Shirts worn at one time
- Chris Crocker - LEAVE BRITNEY ALONE!
- All Your Base Are Belong To Us
- Miss Teen USA 2007 - South Carolina answers a question
- Numa Numa
- Three guys dancing?
- Evolution of Dance
- "Chocolate Rain" Original Song by Tay Zonday
- Federline's PopoZão
- Daft Hands
- Daft Bodies (They also have a Weezer promotion)
- Best Sex Ever!!!
- Shoes the Full Version (They also have a Weezer promotion)
- It's Peanut Butter Jelly Time!!!
- Will it blend? (shown in montage at the end)
- Charlie The Unicorn (shown in montage at the end)
- Some UFO? (shown in montage at the end)
Is it sad or impressive I recognized 80% of them? Please tell me if you know any that I've missed. :-)
Posted by
Jesse Mandel
at
8:39 AM
0
comments
Links to this post
Thursday, May 15, 2008
Finicky Configuration.RegexStringValidator
I was working on a custom ConfigurationElement for an HttpModule and I needed two properties. They both needed to be in the form of a URL (but only the host) and one was required. Regular expressions are a great tool for easily verifying a string is in a certain format and Microsoft was nice enough to include the RegexStringValidatorAttribute. So I tried this:
[ConfigurationProperty("Url", IsRequired = true)]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]
[ConfigurationProperty("Url2", IsRequired = false)]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]
If you know regular expressions you can see a simple URL like "http://www.jessemandel.com" should validate. Neither one worked, plus it gave me the misleading error that "http://www.jessemandel.com" wasn't validating.
After a bit of fiddling around, I figured out that at some point the RegexStringValidator is validating the default value. In this case it's an empty string which is not valid. This makes sense for Url2 if it's not provided but it told me "http://www.jessemandel.com" was invalid.
The second one was an easy fix. Since it's not required, I changed the regular expression to allow "" and now it works.
[ConfigurationProperty("Url2", IsRequired = false)]
[RegexStringValidator(@"^(https?://[A-Za-z\d\-_\.]+)?$")]
I can't do the same for the first one because I don't want an empty string to be valid. It's required so it's never empty but I guess when it initializes it loads the default value. Adding a DefaultValue that is valid does the trick.
[ConfigurationProperty("Url", IsRequired = true, DefaultValue = "http://localhost")]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]
You don't have to worry about the DefaultValue much because if you do not include the property at all you'll get the error, "Required attribute 'Url' not found." and if you include an invalid Url, you'll get the error, "The value does not conform to the validation regex string '^https?://[A-Za-z\d\-_\.]+$'."
Posted by
Jesse Mandel
at
5:38 PM
1 comments
Links to this post
Labels: .NET, C#, Regular Expressions
Thursday, February 14, 2008
PlascoEnergy Group
This company is amazing! They take trash and convert it into energy using a process called plasma gasification. Plasma gasification uses plasma (super heated gas) to break down (not burn) trash into its basic elements. This allows all kinds of trash to be disposed of. Things like biomedical waste, toxic chemicals, concrete, metal, plastics.
Plasco Energy Group has the only full scale working prototype of its kind. What makes Plasco unique is how it organizes the material afterwards. Plasco uses a series of tubes (like the internet!) to sort the material so it is more useful and sends it through turbines to create energy. The most amazing part is once their power plant gets running, it produces enough electricity to sustain itself and put some power back into the grid. Plus after the process is complete, there is only about 0.2% waste product.
Check out the video by the Discovery Channel
Posted by
Jesse Mandel
at
5:17 PM
0
comments
Links to this post
Labels: plasma gasification
Tuesday, February 5, 2008
Internet News Readers
I read a lot of news on the internet. I also follow a few comics and read programming articles. I keep up with the TED.com videos. I have a few friends with blogs that I read. All in all there are 50 sites I want to keep track of and I am always adding more.
How do I do it? Sure I could bookmark them all and check them on a regular basis but 50+ sites would take forever! Luckily there is an easier way, feeds.
There are two standards for feeds, Atom and RSS. There are a few differences but for the most part, they function the same. They are an XML file that lists the (articles, comics, videos, blog posts) on a given web site. Now using a reader, you can subscribe to as many of these feeds as you want and have one place to check all you favorite websites for updates.
There are many free news readers available. Personally I use Google Reader. It has a slick, intuitive interface and stores my subscriptions online so I can log in from anywhere and check them. You can also use Outlook, Thunderbird, My Yahoo!, or any other news reader. You can even make live bookmarks in Firefox or add feeds directly to IE7.
Once you've chosen your reader, look for the universal feed icon
or subscribe links to add them to your reader. Try it by subscribing to mine! :-)
-Jesse
PS- If you run your own feed, there a a tool called Feed Burner that allows you to count the number of subscribers you have.
Posted by
Jesse Mandel
at
5:37 PM
1 comments
Links to this post
Labels: News Reader
Wednesday, January 16, 2008
Burning Man 2008 Tickets On Sale!
Tickets to this years Burning Man go on sale today at 10:00 AM PST. Tickets get more expensive throughout the year so get em while they're hot.
I went for my first time last year and it was awesome.
Posted by
Jesse Mandel
at
9:23 AM
0
comments
Links to this post
Labels: Burning Man