Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Sep 19, 2014 10:29 am 
Offline
Newbie

Joined: Fri Sep 19, 2014 9:50 am
Posts: 2
We just got a (second) Linode (8192) about 10-12 days ago. We have a single webserver / application running on this new Linode. It is a ruby application. There are points at which it needs to do some queries and then computational stuff using the query results. I develop this app on an i7 MacBookPro. An operation that takes ~10s on my laptop takes ~90s on the Linode. The performance of my application on the Linode is unacceptably slow from my client's POV. I am really kind of surprised that my laptop is soooo much faster. I'll admit to not knowing much about VPSs and whatnot. Can anyone help me to understand why things are so much slower on the Linode and/or point me towards ideas for possible solutions? I'd like to solve the problem but I'm also interested in learning more about the background that this problem is showing up against.


Last edited by mfaughn on Mon Sep 22, 2014 9:16 am, edited 1 time in total.

Top
   
PostPosted: Fri Sep 19, 2014 4:13 pm 
Offline
Senior Member

Joined: Thu Feb 20, 2014 5:06 pm
Posts: 58
I've done quite a bit of benchmarking with Rails applications on Linode, and I've found it can be very difficult to get statistically sound results due to a wide range of factors, some of which you can control for and some you can't. There are some steps you can take to reduce the complexity to manageable levels, most of which are best practices anyway. The first is get your laptop set up so the environment your application is running on is as similar as possible to the Linode, which pretty much necessitates using a virtual machine. I use a combination of VirtualBox, Vagrant, and Puppet to achieve this: Vagrant handles creating a VirtualBox VM with the same distro as my Linode, then Puppet installs all the necessary packages and configures things appropriately. The end result is that I can get a VM that's exactly identical software-wise to any of the Linodes I manage by just typing "vagrant up <hostname>". If you don't want to go through all the work of writing Puppet manifests for you environment, you can just download a pre-built Vagrant box and configure it manually. In any case, the goal here is to control for as many variables as possible, since otherwise there's way too many confounding factors to deal with.

After that, you'll probably want to use ruby-prof to generate a cachegrind dump of the application so you can see where it spends most of its time, then design benchmarks around that.


Top
   
PostPosted: Fri Sep 19, 2014 4:48 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
mfaughn,
Perhaps you could describe what your application does, what type of calculations, if a database is involved, if you're using caching, what role the VPN plays, etc. All we know is that you have a Ruby application.


MSJ


Top
   
PostPosted: Fri Sep 19, 2014 5:02 pm 
Offline
Junior Member

Joined: Tue Apr 01, 2014 12:45 pm
Posts: 29
Website: http://centminmod.com
Location: Brisbane, Australia
What's the specs of your laptop for cpu processor and clock speed. If you Ruby work is clock speed sensitive, then I'm pretty sure it would be faster than Linode given then use E5-2680v2 processors which are base clocked at 2.8Ghz, all 8 cpu thread utilisation at Turbo Boost of 3.1Ghz and single core utilisation at 3.6Ghz http://www.cpu-world.com/CPUs/Xeon/Inte ... %20v2.html

For instance my Samsung ATIV Book 8 laptop uses Core i7 3635QM at 2.4Ghz base and 3.4Ghz Turbo Boost http://www.cpu-world.com/CPUs/Core_i7/I ... essor.html so depending on your apps number of cpu core utilisation, your laptop's Turbo Boost speed might be at a clock speed that is higher than Linode's E5-2680v2 processors Turbo Boost clock speed profiles. Not to mention virtualisation overheads associated with Linode Xen virtualisation compared to non-virtualised laptop environment.

Also Linode 8GBVPS only has 6 cpu cores, so your Intel Core i7 based laptop most likely is quad core with HT = 8 cpu threads, so pretty much more cpu threads available than Linode if you are testing with Ruby which is multi-threaded based. If it's single thread based then it's pretty close depending on your laptop's single threaded Turbo Boost clock speed profile compared to Linode's E5-2680v2 single threaded Turbo Boost clock speed of 3.6Ghz.

checking local specs of MacBook Pro with retina display can be configured to

Quote:
2.5GHz quad-core Intel Core i7 processor (Turbo Boost up to 3.7GHz) with 6MB shared L3 cache
Configurable to 2.8GHz quad-core Intel Core i7 (Turbo Boost up to 4.0GHz) with 6MB shared L3 cache.


so yes quite possible you have 8 cpu threads working at Turbo Boost up to 3.7Ghz to 4.0Ghz which would be faster than Linode's 8GB 6 cpu threads at Turbo Boost of 3.6Ghz for single threaded work loads

also MacBook's might be with PCI-E SSD storage which would be faster than Linode's SSD offering so if your work loads touch the disk then can make a difference there too.

_________________
* Centmin Mod Nginx menu based auto installer (Nginx, PHP-FPM, MariaDB MySQL) :: Centmin Mod LEMP Stack - What's New


Top
   
PostPosted: Mon Sep 22, 2014 9:50 am 
Offline
Newbie

Joined: Fri Sep 19, 2014 9:50 am
Posts: 2
Ruby can only utilize a single core at a time. According to the numbers generated by Passmark the Linode's CPU and my rMBP i7 have single-core benchmarks that are pretty close. Order of magnitude difference in speed is what I'm seeing.

App -- VPN was a mistake. I meant VPS. No VPN involved. Application uses Ruby Sequel ORM backed by SQLite. App traverses a tree, starting at root, and for example, builds an XML representation of tree. This is simple stuff, get object, parse attribute values into appropriate string, feed XML builder (which is just building a big string). Tree is composed of different types of objects (not that it should really matter). No caching involved.


Top
   
PostPosted: Sat Oct 18, 2014 2:11 am 
Offline
Senior Member

Joined: Wed Jun 27, 2012 10:00 pm
Posts: 87
Website: http://hemonc.org/wiki/Main_Page
I do not know what the current breakdown is of how many instances of Linode 8 GBs there are in one actual server, but it's possible that one of your VPS neighbors is consuming a larger amount of resources. Please see my thread here for the experience that I had.

(whoops, just realized this is an older thread)

_________________
Amateur, eager to learn.
My hematology, oncology, and chemotherapy regimen wiki


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group