Showing posts with label Windows 7. Show all posts
Showing posts with label Windows 7. Show all posts

Productivity and happiness going from 4 to 8 GB RAM

This post tries to illustrate the productivity improvements you get when you go from 4 GB to 8 GB RAM.

I bought a Mac mini last year and when I started using it to do software development, data started to be processed very very slow… I ordered mini with “just” 4 GB RAM. My assumption that I’d develop only Mac software wasn’t true because now I know that I can’t live without Windows development. This way I have to use a virtual machine/VM (Windows 7) to install Visual Studio, database servers and everything else. That requires a lot of memory as you may know already.

Situation before and after memory upgrade

Mac OS Win VM Comment Feeling
Before 3 GB 1 GB This is crazy. I know. Necessity rules. Steaming mad
After 4 GB 4GB This is what a software developer needs today. Open-mouthed smile

There’s nothing better than images to illustrate my situation before and after the memory upgrade. Pictures can tell thousands words… Seeing is believing!

Before memory upgrade

Mac OS Activity Monitor  ( before memory upgrade ) Screenshot 1 - Mac OS Activity Monitor  ( before memory upgrade )

Parallels Desktop with Windows 7 virtual machine - Process Explorer ( before memory upgrade ) Screenshot 2 - Parallels Desktop with Windows 7 virtual machine
Process Explorer ( before memory upgrade )

Parallels Desktop with Windows 7 virtual machine - System Information ( before memory upgrade ) Screenshot 3 - Parallels Desktop with Windows 7 virtual machine
System Information ( before memory upgrade )

After memory upgrade

Mac OS Activity Monitor ( after memory upgrade ) Screenshot 4 - Mac OS Activity Monitor ( after memory upgrade )

Parallels Desktop with Windows 7 virtual machine - Process Explorer ( after memory upgrade ) Screenshot 5 - Parallels Desktop with Windows 7 virtual machine
Process Explorer ( after memory upgrade )

Parallels Desktop with Windows 7 virtual machine - System Information ( after memory upgrade ) Screenshot 6 - Parallels Desktop with Windows 7 virtual machine
System Information ( after memory upgrade )

Analysis and Points to take into account
1 - In both Activity Monitors (Screenshot 1 and Screenshot 4) you can see in the pie chart that the sum of memory (3.75 GB and 7.75 GB) is always 250 MB bellow the total installed memory. This is because Mac mini shares its RAM with the video card.

2 - I do not turn off the computer, that is, I put the computer to Sleep (Mac OS term for what we call Hibernate in Windows). When the computer comes back from sleep its memory isn’t completely empty. These screenshots were taken while the computer was in the process of sleeping/waking for a few days and hence the values of Wired, Active, Inactive memory tend to stay high even after waking the computer.

3 - The number of open apps is for sure different but I can guarantee that I have much more apps open after the upgrade, for example: two Visual Studios (desenv.exe) in Screenshot 5 while I had only 1 VS opened in Screenshot 2. To make it even more clear we just have to compare the Totals section of Win 7 System Information. Before I had 53 processes and after 75 (Screenshot 3 and Screenshot 6). An increase of 41.50%.

4 - Despite the values for Page outs and Swap used, after the upgrade I change screens very very fast. So these values do not scary me anymore.

5 - After upgrading Parallels Desktop 6 to its latest release (Build 6.0.12090 / Revision 660720; May 26, 2011) I noted a better memory management regarding the virtual machine. Now Page outs and Swap used are in MBs as shown in Screenshot 7:

Mac OS Activity Monitor after Parallels Desktop upgradeScreenshot 7 - Mac OS Activity Monitor after Parallels Desktop upgrade

Conclusion
Comparing the data shown above, it’s clear that RAM upgrade plays a big role when it comes to developer productivity and happiness.

Now I can say that I have a responsive computer and that means a lot in my day to day work.

Developer: get 8 GB RAM if you can afford it. It’s the bare minimum in 2011. You’ll be happy. No stress… If you can afford and your hardware supports 16 GB RAM, go for it and you’ll have no RAM headaches for a long long period.

Manager or whoever pays the bill: give a descent computer to your developers with at least 8 GB RAM! No excuses… RAM is so cheap nowadays that I don’t understand how can a lot of developers out there work with less than the necessary amount of RAM.

Note 1: Windows processes and memory information come from Process Explorer by Sysinternals. It’s way better and more powerful than Windows default Task Manager.

Note 2: To better understand memory information in Mac OS, refer to this article by Apple: Mac OS X: Reading system memory usage in Activity Monitor

Access web app from Parallels Win 7 VM in Mac OS

About a month ago I started the creation of an ASP.NET MVC 3 app to a buddy. I’ll write some blog posts in the near future sharing my experiences with this awesome web framework. This app I’m still developing is a web application that I develop using my "new” computer. Today I use Mac OS as my main operating system and since I’m using ASP.NET I also need to use Windows.

Parallels Desktop is the way to go to have a Windows virtual machine [ VM ] running side by side with Mac OS. This way you have the best of both worlds. I discuss more about Parallels Desktop here.

One of the things I wanted to do during the development was seeing how the app would look like when viewed in a different OS, in this case, I’d like to see it running in Mac OS as if I were an end user accessing the app. This is good to test how the app behaves when it’s viewed in a different environment, that is, the perspective/environment of the end user, and not the developer’s perspective/development environment.

It’s cool to see the app running in a different OS and different web browsers. In Mac OS I have the chance of testing it against Safari too. I also have the chance of seeing how exceptions are being handled. There are certain types of errors that only happen when the end user is using the app in his environment. I think you know that already. This kind of testing allows me to deliver a better user experience.

When the app is accessed from the Mac side, the first difference is mainly visual because my Win 7 VM has all visual effects (clear type) disabled and so things look really simple if compared to Mac OS. I’m running the VM with no visual effects so that I have a somewhat fast VM to do the development. I only have 4 GB RAM available and I have to share it with both operating systems. I thought 4 GB RAM would suffice but that’s not the case. I have already ordered 8 GB RAM but am eagerly waiting it arrive from US. That’s another story that I plan to write in other blog post.

The reason I’m writing this post is that things don’t work at first when you try to access in Mac your app that is running in Windows VM. To get things working from both sides ( host = Mac OS and VM = Windows 7 ) they must see/communicate with each other. That’s where I had to do some work to get things going. So here are some instructions of what you need do:

1 - Set a fixed IP address for Windows VM
Set up a fixed IP address (read this page for a complete guide) in your Windows 7 virtual machine. This will make it easy when you need to access your app from Mac OS side. You won’t need to take note of different IP addresses handled by the DHCP server each time you restart your VM.

Windows 7 VM with fixed IP addressFigure 1 - Windows7 VM with fixed IP address

Above I have given the IP 192.168.1.106 to the VM. As I do not have a lot of devices connected to my wireless router, this IP is just fine.

2 - Set Virtual Machine’s Network Type
In your Parallels VM devices bar set your network type (orange arrow) as bridged:

Parallels Desktop VM devices toolbarFigure 2 - Parallels Desktop VM devices toolbar

3 - Test Communication between Host and VM
Make sure both operating systems can see each other.

Open Mac OS Terminal and execute a ping command:

ping 192.168.1.106

Change the IP with the IP you have in your Windows VM.

You should see something like this:

Mac OS Terminal pinging Windows 7 VMFigure 3 - Mac OS Terminal pinging Windows 7 VM

Now, open Windows 7 Command Prompt and ping Mac IP address. To see your Mac IP address go to System Preferences. Under Internet & Wireless, select Network.

Mac OS IP addressFigure 4 - Mac OS IP address

Let’s ping 192.168.1.100:

Windows 7 VM Command Prompt pinging MacFigure 5 - Windows 7 VM Command Prompt pinging Mac

As you see, both computers can see/communicate with each other. This means that the Network is working as expected.

4 - Configure Windows VM webserver for external traffic
What address should you type in a Mac OS browser to access the app? Well, this needs a little bit of caring. You’ll probably fail when trying to access the app with the same address you use in Windows side.

I’m using IIS Express as the web server in Windows. You can install it using Microsoft WebMatrix. IIS Express is by default configured to only server internal traffic (Windows VM). As I’m trying to access it from an external environment (Mac OS), I needed to configure it. The first link bellow was the main doc that helped me:

Serving external traffic with WebMatrix Beta
Handling URL Binding Failures in IIS Express (Serving External Traffic)

Basically I had to configure HTTP.SYS, create a URL binding that allow me to access the app in Mac side and disable Windows Firewall for my private home network.

4.1 - Configure HTTP.SYS
Type this command in Windows command prompt:

netsh http add urlacl url=http://leniel-pc:7777/ user=everyone

Change the url in the above command according to your desired configuration.

Note: the above command requires elevation. Right click the command prompt shortcut and select Run as administrator.

4.2 - Configure URL binding
As mentioned in the 2nd doc referenced above you must open your applicationhost.config file and add URL bindings that fit your needs. Mine is located here:

C:\Users\Leniel\Documents\IISExpress\config\applicationhost.config

Take a look at the last binding I have added:

<site name="FitnessCenter" id="3">

<application path="/" applicationPool="Clr4IntegratedAppPool">

<virtualDirectory path="/" physicalPath="C:\Users\Leniel\Documents\Visual Studio 2010\Projects\FitnessCenter\FitnessCenter.Web" />

</application>

<bindings>

<binding protocol="http" bindingInformation="*:7777:leniel-pc" />
<binding protocol="http" bindingInformation="*:7777:localhost" />

<binding protocol="http" bindingInformation=":7777:leniel-pc" />

<binding protocol="http" bindingInformation="192.168.1.106:7777:"/>

</bindings>

</site>

4.3 - Configure Windows VM firewall
The last step is disabling Windows VM firewall for your Home or work private networks.

Windows 7 VM FirewallFigure 6 - Windows 7 VM Firewall

As I just use this virtual machine to do software development, it’s ok to me to disable the firewall. Be careful though. Surprised smile

5 - Access Win 7 VM web app in Mac OS
After all this configuration you should be able to browse your app externally.

To see if everything is working, open a browser in Mac OS and try to access the app typing something as this in my case:

http://192.168.1.106:7777/

That’s it.

Hope it helps.

Testing Windows 7 beta and RC versions

Windows is the piece of software that underlies everything on my computer so that I thought it would be a great opportunity to write about it since we’re on the verge of its new version, namely, Windows 7.

I’ve been testing Windows 7 for the last two months. It’s been my operating system since then.

Firstly I got the 32-bit Beta release on March, 15th and today I’m downloading the 64-bit RC (release candidate) version. I plan to install it this weekend and as soon as I have it installed and configured I’ll update this post.

What I have to write about this operating system? Numbered from 1 to 7 in an unordered relevance fashion…

1 - It is fast.
2 - I risk to say it is faster than Windows XP.
3 - It is beautiful! Take a look at the new taskbar.
4 - It simplifies a lot of tasks.
5 - It has more native programs.
6 - Previous Windows’s native programs got a refresh and were optimized.
7 - It adds more security points to your day to day tasks.

My Windows 7 Beta taskbar:

Windows 7 Beta Taskbar

I moved directly from Windows XP to Windows 7. I didn’t use Windows Vista because it was too bloated for my computer in the beginning of 2006 when I also tested it in the beta period. At that time I had an AMD Athlon XP 2400+ with 512 MB RAM memory and an onboard video card which didn’t allow me to get the so famous Aero interface. I didn’t have a plan to upgrade my hardware. That was the big impediment. I think that Windows Vista arrived in a time in which the majority of computers didn’t have a proper hardware configuration yet.

Now the landscape is different. Windows 7 appears in a time that it’s much cheaper to buy a 2-core computer with GBs of RAM memory; Computer prices went down during the past years even here in Brazil where hardware prices double if compared with US $. Today $ 1 = R$ 2.07. This price is still attractive. Believe it or not! :)

The following picture shows my current computer configuration:

 Windows 7 System configuration

This is the Windows Experience Index score I got - a low score given the fact that I still use an onboard video card and that the score is determined by the lowest subscore:

 Windows 7 Windows Experience Index

Even with a 3.2 score I have the windows Aero enabled. Take a look at the Windows Experience Index: An In-Depth Look post that describes the score levels and what system’s features are enabled or disabled based on them.

From the Engineering the Windows 7 “Windows Experience Index” post we have the following:

The Vista-era general guidelines for systems in the 1.0, 2.0, 3.0, 4.0 and 5.0 ranges still apply to Windows 7. But, Windows 7 has added levels 6.0 and 7.0; meaning 7.9 is the maximum score possible.

While using Windows 7 beta I installed all the software I work with as the Microsoft Visual Studio 2008 Professional, Oracle Database, PL/SQL Developer, TortoiseSVN, etc - a typical developer box.

Windows 7 didn’t crash and was a well behaved operating system during this beta period in which I did everything I used to do in Windows XP.

The only hardware problem I had was with a Creative Audigy sound card (model number SB0090). There was no driver available for Windows 7. So I had to install a driver that wasn’t full compatible. The sound didn’t sound as good as it should be. I experienced a lot of noise.
Creative Labs has a Windows 7 - Driver Availability Chart in case you’re interested.

All in all you’ll get a great experience with such a robust operating system. After all Windows is ubiquitous and the more you can do with it the better you get at work.

Updated on 6/6/2009 05:48:00 PM

I’ve installed Windows 7 64-bit version but I didn’t use it because for the sake of my work I thought Win 7 wouldn’t play as expected.

Firstly we should consider that Windows 7 64-bit has a default Program Files (x86) folder where it puts all applications that are made to run on a 32-bit operating system. This particularly broke my way because the software that I develop rely on an Oracle database connection. There is a known bug with Oracle that prevents an application hosted in a folder that has parenthesis in its name to access an Oracle database.

I didn’t notice any performance gains while running the 64-bit OS.

Today I finally installed the Windows 7 RC 32-bit. I upgraded from the 32-bit Beta version to the RC version. The upgrade is only possible from 32-bit to 32-bit versions and not from a 64-bit Beta to 32-bit RC and vice versa.

The upgrade took 1 hour and 40 minutes to complete and ran flawlessly. You may ask why this took so long? This is because in a upgrade it is necessary to copy a lot of files from the old OS to the new one.

I downloaded the ISO file and extracted its content to a temp folder. I changed the file cversion.ini as described in the post Delivering a quality upgrade experience from the Engineering Windows 7 blog so that I could go through the upgrade. I then clicked setup.exe while running the Windows 7 beta version and the installation started.

I got the following report:

Upgrading Windows will affect the following devices and/or programs:

          These programs might not work properly after the upgrade. We recommend uninstalling these programs before upgrading. Cancel the upgrade, open Control Panel, and search for "uninstall a program". (Note: Programs marked as * can be safely reinstalled after the upgrade.)
          • Microsoft SQL Server 2008
          • Microsoft SQL Server 2005

        I then decided to ignore the report and proceeded with the installation.

        Windows 7 - Upgrading from 32-bit Beta to RC

        The above image shows the early stages of the upgrade. In fact there were more than 400000 files to be gathered. I already had an extensive list of apps installed on the beta OS as for example Microsoft Office 2007 that in itself is a big suite of apps.

        Windows 7 then restarted sometimes and installed the new OS bits that were refined from Beta to RC. The last step was to transfer files, settings and programs to the new OS. It transferred a total of 524490 files.

        My Windows 7 RC taskbar:

        Windows 7 RC Taskbar

        From this what I have to say now that I’m using the RC to write this blog post using Windows Live Writer is that the upgrade was successful. I didn’t need to reinstall anything (including Windows Live Writer). Everything is the way they were before installing the RC version.

        I had a pleasant experience while upgrading from Beta to RC.

        Congratulations to the Microsoft Windows 7 Team for providing this must have feature, that is, making upgrades possible! :-)

        A last note: I described above the problem I had while configuring my Creative Audigy sound card in Windows 7 Beta. With the RC version the Creative Audigy soundcard is functioning as expected. One of the first things Windows 7 did was to install the sound card driver!

        Updated on 2/22/2010

        On February, 17 I made the change to Windows 7 RTM version. After almost a year of constant use the RC version proved to be really stable.

        Now let’s use Windows 7 till Windows 8 comes.

        References
        Engineering Windows 7 blog
        http://blogs.msdn.com/e7

        Windows 7 Team blog
        http://windowsteamblog.com/blogs/windows7

        Microsoft official Windows 7 site
        http://www.microsoft.com/windows/windows-7/default.aspx

        Windows 7 @ Paul Thurrott's SuperSite for Windows
        http://www.winsupersite.com/win7

        Windows 7 article at Wikipedia
        http://en.wikipedia.org/wiki/Windows_7

        List of features new to Windows 7
        http://en.wikipedia.org/wiki/Features_new_to_Windows_7