performance - Hardware concerns for optimal ruby on rails development on ubuntu machine

07
2014-07
  • BenU

    I've been developing dynamic web sites using ruby on rails on a 5 year old mac mini which has been great except that it takes too much time -- 15 minutes or so -- to run my simple test suites. I believe that I could reduce that time with an upgraded computer running ubuntu. Still, I don't know where the bottlenecks are causing those tests to run slowly. Should I focus on the cpu, ram, hard drive, MOBO and do I even need a video card if my cpu/mobo has some graphics capability?

    I've read Build an Awesome PC for 2014 and studied the great component overview at Logical Increments. I put together a preliminary build at PC Partpicker. I was about to post my planed build on Reddit's Build A PC site when I got cold feet. Most of the info I've read is directed towards optimal gaming and I'm not sure how applicable that is for my needs.

    I'd be super grateful if anyone had any insights to share regarding what my needs are for optimal ruby on rails web development.

    Thanks in advance! Ben

    Relevant Current system specs

    Graphics/Displays:

    NVIDIA GeForce 9400:
    
      Chipset Model: NVIDIA GeForce 9400
      Type: GPU
      Bus: PCI
      VRAM (Total): 256 MB
      Vendor: NVIDIA (0x10de)
      Device ID: 0x0861
      Revision ID: 0x00b1
      ROM Revision: 3362
      Displays:
        L2270NW:
          Resolution: 1440 x 900 @ 75 Hz
          Pixel Depth: 32-Bit Color (ARGB8888)
          Display Serial Number: 0
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
        L1916HW:
          Resolution: 1280 x 800 @ 60 Hz
          Pixel Depth: 32-Bit Color (ARGB8888)
          Display Serial Number: 0
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Adapter Type: Apple Mini DisplayPort To VGA Adapter
          Adapter Firmware Version: 1.03
    

    Hardware:

    Hardware Overview:
    
      Model Name: Mac mini
      Model Identifier: Macmini3,1
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache: 3 MB
      Memory: 8 GB
      Bus Speed: 1.07 GHz
      Boot ROM Version: MM31.0081.B06
      SMC Version (system): 1.35f0
      Serial Number (system): YM90634W19X
      Hardware UUID: B368DCBF-F005-5126-BF7C-BC2ED886642E
    

    Memory:

    Memory Slots:
    
      ECC: Disabled
    
        BANK 0/DIMM0:
    
          Size: 4 GB
          Type: DDR3
          Speed: 1067 MHz
          Status: OK
          Manufacturer: 0x857F
          Part Number: 0x483634353155363446373036364700000000
          Serial Number: 0x00000000
    
        BANK 1/DIMM0:
    
          Size: 4 GB
          Type: DDR3
          Speed: 1067 MHz
          Status: OK
          Manufacturer: 0x857F
          Part Number: 0x483634353155363446373036364700000000
          Serial Number: 0x00000000
    

    Serial-ATA:

    NVidia MCP79 AHCI:
    
      Vendor: NVidia
      Product: MCP79 AHCI
      Link Speed: 3 Gigabit
      Negotiated Link Speed: 3 Gigabit
      Description: AHCI Version 1.20 Supported
    
        OWC Mercury Electra 3G SSD:
    
          Capacity: 120.03 GB (120,034,123,776 bytes)
          Model: OWC Mercury Electra 3G SSD            
          Revision: 501ABBF0
          Serial Number: EX3G12012E08H9170   
          Native Command Queuing: Yes
          Queue Depth: 32
          Removable Media: No
          Detachable Drive: No
          BSD Name: disk0
          Medium Type: Solid State
          TRIM Support: No
          Bay Name: Lower
          Partition Map Type: GPT (GUID Partition Table)
          S.M.A.R.T. status: Verified
          Volumes:
            disk0s1:
              Capacity: 209.7 MB (209,715,200 bytes)
              BSD Name: disk0s1
              Content: EFI
            Macintosh HD:
              Capacity: 107.1 GB (107,101,011,968 bytes)
              Available: 8.86 GB (8,863,625,216 bytes)
              Writable: Yes
              File System: Journaled HFS+
              BSD Name: disk0s2
              Mount Point: /
              Content: Apple_HFS
            Recovery HD:
              Capacity: 650 MB (650,006,528 bytes)
              BSD Name: disk0s3
              Content: Apple_Boot
            Untitled 2:
              Capacity: 11.94 GB (11,939,131,392 bytes)
              Available: 235.2 MB (235,216,896 bytes)
              Writable: Yes
              File System: Journaled HFS+
              BSD Name: disk0s4
              Mount Point: /Volumes/Untitled 2
              Content: Apple_HFS
    
    NVidia MCP79 AHCI:
    
      Vendor: NVidia
      Product: MCP79 AHCI
      Link Speed: 3 Gigabit
      Negotiated Link Speed: 1.5 Gigabit
      Description: AHCI Version 1.20 Supported
    
        PIONEER DVD-RW  DVRTS08:
    
          Model: PIONEER DVD-RW  DVRTS08                 
          Revision: Q81B    
          Native Command Queuing: No
          Detachable Drive: No
          Power Off: No
          Async Notification: Yes
          Bay Name: Upper
    

    Software:

    System Software Overview:
    
      System Version: Mac OS X 10.7.5 (11G63b)
      Kernel Version: Darwin 11.4.2
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: XXX’s Mac mini
      User Name: xxx (xxx)
      Secure Virtual Memory: Enabled
      64-bit Kernel and Extensions: Yes
      Time since boot: 15:31
    
  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    ssh - Facebook with Ruby on Rails
  • Jono

    I'm trying to follow the Facebooker tutorial (for Ruby on Rails) but I can't get the ssh tunnel running:

    Bring up your terminal again. You need to start your local development server, and then make that server available to the wider internet. Do this like so:

    script/server &  
    rake facebooker:tunnel:start &
    

    Once your server has started, the second command will start a reverse ssh tunnel.

    When I execute the second command, I get the following:

    user@computer:~/facebooker-test$ rake -t facebooker:tunnel:start 
    (in /home/user/facebooker-test)  
    ** Invoke facebooker:tunnel:start (first_time)  
    ** Invoke environment (first_time)  
    ** Execute environment  
    ** Invoke facebooker:tunnel:config (first_time)  
    ** Invoke environment  
    ** Execute facebooker:tunnel:config
    ** Execute facebooker:tunnel:start
    Starting tunnel :4007 to 0.0.0.0:3000
    OpenSSH_5.1p1 Debian-6ubuntu2, OpenSSL 0.9.8g 19 Oct 2007
    usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
               [-D [bind_address:]port] [-e escape_char] [-F configfile]
               [-i identity_file] [-L [bind_address:]port:host:hostport]
               [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
               [-R [bind_address:]port:host:hostport] [-S ctl_path]
               [-w local_tun[:remote_tun]] [user@]hostname [command]
    user@computer:~/facebooker-test$
    

    Apparently, there's some sort of incompatibility between the rake task's ssh command, and the correct syntax.

    I'm using Ubuntu 9.10 with the openssh-server package, and the facebooker plugin for Ruby on Rails out-of-the-box from github.

    Any ideas?


  • Related Answers
  • Jono

    okay, I've figured it out. Apparently, I was missing some definitions in my facebooker.yml file.

    I had to put in the host and usernam.

    I discovered this by going into vendor/plugins/facebooker/lib/tasks/tunnel.rake and putting adding the following line to the end of the :config directive:

    @notification <<"using the following ssh command: \n #{@ssh_command}"
    

    Then, when I call rake with -t option, I get an output of how the command will be executed. I saw a trailing @ at the end of the command, and realized what was missing. Yay me!