Friday, June 22, 2007

Is your computer running out of RAM?

Windows Users, Howto know if your computer is running out of RAM/Memory:

Open the Windows Task Manager (ctrl + alt + delete). Note the stats below the PF history. (screenshot)




From the screenshot above:

Total Physical Memory - This is the total amout of RAM/Physical memory installed in the computer. Total amount of RAM installed = 1.5GB

Commit Charge - The maximum amount of space used by the pagefile = 1.2GB

Total Physical Memory (K) = 1562668 ~1.5GB
Commit Charge Peak value (K) = 1340072 ~1.2GB

* Divide (K) by 1048576 to convert value to GB

Total Free RAM/Memory = Total Physical Memory - Commit Charge Peak value
= 1.5 - 1.2
= 0.3GB (~307MB)

In this example, 307MB is the total free memory available under load. This number is acceptable. I still have room to run a few more apps.

IF your total free memory is in the negative, Windows _will_ swap contents to the pagefile instead of the memory. This causes applications to slow down and Windows runs like a pig. Perhaps its time for that long awaited RAM upgrade. ;-)


Linux, check the amount of free RAM available:

Run the command free -m at the shell prompt:

-sh-3.00$ free -m
total used free shared buffers cached
Mem: 1010 794 215 0 14 205
-/+ buffers/cache: 575 435
Swap: 2000 257 1743

Sunday, June 17, 2007

Getting Up to Speed with RaidRails, Ruby on Rails

This how-to assumes you have a basic understanding of Ruby and Rails.

Requirements:

Windows XP (I have tested the following in a Windows XP Pro SP2 environment)

XAMPP:
Install - Apache & MySQL
http://www.apachefriends.org/en/xampp-windows.html

Instant Rails:
http://rubyforge.org/frs/?group_id=904

Radrails:
http://www.aptana.com/download_radrails.php


1) Configure Rails and Rake path
Navigate to the Instant Rails directory.
Select the rails binary and rake.bat as shown below




2) Setup the Ruby Interpreter
Select ruby.exe located in the \bin\ dir




3) Start the MySQL server




4) Create a New Project - RadRails





5) Enter a Project Name





6) Hello World!




Ruby:
http://www.ruby-lang.org/en/

Ruby on Rails framework:
http://www.rubyonrails.org/

Ruby forge:
http://rubyforge.org/

Ruby Help and Docs:
http://www.ruby-doc.org/

Streamlined:
http://streamlinedframework.org:8079/trac/

IBM Fast-track your Web apps with Ruby on Rails:
http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/