It has been a great 10 years

23. April 2010

Today marks my 10-year anniversary at eQuest/Planet Technologies. It almost seems odd to write that… 10 years seems like a long time, and particularly to be at the same company in the Internet/Technology field.

During my tenure at Planet, I’ve had the privilege to work and cross paths with a number of great people – too many to name specifically but I do want to mention Scott Tucker, Steve Winter, and Dan Nelson. These men are passionate about their work and a pleasure to work with. I’ve also had the opportunity to hold a number of different roles ranging from “server build guy” to dev team lead, to world traveler, and now get to play around as a research scientist. The work has rarely (read: “never”) been boring and it seems like nearly every day presents another opportunity to solve a difficult challenge.

Today doesn’t represent any sort of change, or adaptation in my career path (I’ve never been particularly good at/fond of career planning). I simply am grateful for the opportunities I have had and am looking forward to what the coming years hold.

Miscellaneous

The Danger with using a framework…

26. February 2010

The danger with using a framework is that sometimes it does things that you aren’t aware of that can send you in circles for  quite some time before you figure them out.

I’ve been working on some tests of some “creative” ways to get data in and out of cloud platforms at rates above the norm and I’ve written a test harness that I’ve been using that will grab a bunch of files, one at a time, and record the file size, duration, etc. for the transfer. I’ve been doing this in a single-threaded fashion for quite some time with reasonable success. The problem began when I attempted to use to run a test that did multi-threaded downloads (multiple threads each grabbing a portion of the file).

NOTE/Crazy Quirk: I don’t yet know why this is the case, but the problem I’m preparing to explain did *not* appear while I had Fiddler running… only when it was *not* running. I’m guessing that this is due to some “magic” that Fiddler does to the HTTP/networking stack..

The behavior I was seeing, was that after two threads would execute, all subsequent threads would fail or timeout. Obviously, when one is doing a significant amount of data movement, this is sub-ideal. The culprit turned out to be the ServicePointManager’s DefaultConnectionLimit. By default, this is configured to 2 which means you can, at most, have 2 open connections to the same TLD at the same time. When I was doing this in serial, there was no problem as the connections were managed/re-used on the main (only) thread.  When doing a number of operations to the same URL (TLD) from multiple threads (especially when you are setting up/tearing them down quickly), it appears that the ServicePointManager is unable to re-use them (not surprising) but neither is it able to determine that the thread is now gone as should be the connection count. (yes, I was behaving and closing my connections).

The solution I came up with was to first shorten the time to live for idle threads, next to monitor the number of threads currently “consumed” and to increase the limit based on how many I needed for the current operations, all while ensuring an upper bound and stand-off mechanism should things get too far out of bounds.

 

// ensure that we don't have lingering connections that will hamper our ability to continue...
// Start by getting the ServicePoint for our current Url 
ServicePoint servicePoint = ServicePointManager.FindServicePoint(new Uri(url));

// see how many connections currently exist...
int existingConnections = servicePoint.CurrentConnections;

// if we are above our upper bound, wait a bit to let things settle down...
while (existingConnections >= 64)
{
    Console.WriteLine("Connection count too high... sleeping for a bit...");
    Thread.Sleep(1000);
}

// ensure that we have enough room to do what we need
if ((existingConnections + options.ConcurrentThreads + 1) > servicePoint.ConnectionLimit)
{
    servicePoint.ConnectionLimit = existingConnections + options.ConcurrentThreads + 1;
}

// only give them a few seconds (5) to time out...
ServicePointManager.MaxServicePointIdleTime = 5000;

Console.WriteLine("Pre-Existing Connections: {0}", existingConnections);
Console.WriteLine("Connection Limit: {0}", servicePoint.ConnectionLimit);

Hopefully, this will be helpful for someone else hitting the same issue.

Miscellaneous , , ,

Linux Desktop for a Windows Guy

23. February 2010

I’ve found myself working quite a bit on “alternative” platforms (various distros of Linux, Mac, etc.) and have been struggling to maintain a bit of simplicity or, at least consistency amongst my work environment. I currently have a setup that is working for me and I thought I’d list how I got it working for those who care – hoping that it might help some windows guy like me who is wanting to live with a single keyboard/mouse setup. I should also state that I’m certain that there is a better way to accomplish this – I welcome suggestions.

The Gear:

  • My main machine at work is an HP workstation with 8 GB of Ram, a bunch of disk space, and three monitors (a 27” in the middle surrounded by two 21” screens).
  • My main laptop is an HP tablet running Fedora 12 (this flavor was at the insistence of a certain Mr. Billings who assured me that this was the only real build). However, to Mr. Billings’ chagrin, I’m still running the Gnome desktop and not KDE like “real people” do.

 

The Goal(s):

  • From my main machine, dedicate at various times one full screen (likely the main one) to the Fedora desktop. I specifically wanted the full Gnome desktop and not just a singular app forwarded over X11
  • Mouse/keyboard movement between the Windows desktop and the Fedora desktop should be seamless – which ever app/desktop had focus should receive the input. Specifically, I didn’t want to have to hit a key-combination of some sort to “release” the input devices from the Fedora desktop and get back to the Windows desktop.
  • Simple integration points such as copy/paste should work seamlessly between them.

 

The solution:

  • Caveats:
    • Let me preface the following by saying I tried a number of things… a handful of Xservers such as Xming and a couple of commercial servers. I’m certain that they work to varying levels, but I didn’t have much success.
    • I also tried some options such as running DSL via qemu (screen never looked right), VMWare hosting another Linux OS as an Xclient into the laptop, etc. None of these worked as smoothly as I felt they should and they all added more overhead to my host box than I was interested in giving up
  • Current Implementation
    • Installed cygwin from http://www.cygwin.com
    • Installed Cygwin/X from http://x.cygwin.com
    • Installed Putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/
    • Created a putty profile for my laptop and enabled X11 forwarding.
    • Open a cygwin bash shell and type
      xwin –nodecoration –screen 0 @1
    • At this point, it will look like nothing happened. You can verify things are started by checking in your system tray for the X server icon.
    • As I understand it, this starts the Xwin server, tells it not to give “Windows”-like borders to the windows it opens/displays from the laptop, and tells it to only use my first screen (my center one). If you just use the shortcut from the start menu you may (as in my case) get a window that spans all of your screens and can be unweildly if they run at different resolutions (the screen would work, but didn’t display properly enough to actually be useable).
    • Now, I establish a Putty connection (ssh) to my laptop and, after logging in, am at the bash shell.
    • at the laptop’s bash shell, I type:
      gnome-session
    • with any luck (at least in my case), I get a full Fedora/Gnome desktop on my main screen and am ready to go, and have met all of the goals listed above.

 

Hope that helps someone!

Miscellaneous

Automated Chart Generation

18. December 2009

It’s late on the Friday afternoon before Christmas week which means things are pretty quiet around the office. This quiet has the net-effect of allowing me to get quite a bit done. The last few days have been very productive with respect to our research project and Azure work (more on that coming soon) which is now in full swing. We are currently working on collecting performance data from our codes running in Azure (and soon in the Amazon cloud) and are also doing some testing of transfer speeds of data both to/from the cloud as well as between compute and storage in the cloud.

I’ve been working to automate much of this testing so we can do things in a repeatable fashion as well has have something that others could run (both other users like ourselves as well as possibly vendors should we come across something that requires a repro scenario). So far, running tests and generating data in CSV or XML format is pretty simple, but I found myself wanting to automatically generate charts/graphs of the data as part of the test process to allow a quick visualization of how the test performed. I spent a good bit of the day looking at old tools for command-line generation of charts (i.e. RDTool, etc.) and none of them were exactly what I was looking for – not to mention my proclivity to using C# and VS.NET tools and my desire to have something that looked refined/polished and not overly raw.

Thankfully, I stumbled upon something I should have remembered existed but simply hadn’t had the need to use before – the System.Windows.Forms.DataVisualization.Charting class. If you aren’t familiar with this assembly, it was released at PDC08 and has a companion Web class for performing similar operations in ASP.NET applications. In my basic testing I was able to build a console application that would ingest the CSV output from my testing harness and then generate some fairly nice looking charts based on that data. The following shows a chart (click the chart to see it full size) generated from ~1800 data points, and automatically generates a 50% band and 90% band allowing the viewer to very easily ascertain the averages and data points. This was generated using a combination of the FastPoint and BoxPlot chart types.

chartImage

Miscellaneous , ,

Misplaced Modifier?

13. March 2009

I was on a few websites this morning (go figure) and noticed a handful of visual missteps (mostly minor). One of them was on the Mix 09 conference page and made me chuckle a little.

On the page talking about being able to watch Mix online (http://visitmix.com/News/Watch-MIX-Online-Ask-the-Gu) they, I think, are trying to encourage you to leave a comment.

image

 

Or, they really don’t like me, and are simply telling me to leave.

Miscellaneous ,