Archive for the ‘Technology’ Category

Hugepages on Linux…Yes You Can Actually Use Them

Wednesday, March 3rd, 2010

Memory on a computer is broken up into pages. Pages used to be one size (eg: 4096 bytes). For various reasons nowadays there are lots of page sizes. Depending on the hardware, in addition to a “base” page size you might have the additional ability to declare that certain parts of memory should be treated as pages of different sizes (eg: 8K, 64K, 256K, 1M, 4M, 16M, 256M…). The reason you’d use these “large” or “huge” pages is that in some cases it improves application performance by minimizing low level overheads and maximizing low level optimizations.

All nice in theory, but it’s been a highly manual choice that a programmer has to make: Which size do I make which pages? Knowing the answer probably requires more computer micro-architectural knowledge than most software developers have. Then there are all sorts of additional complications with practical stuff like getting hugepages, managing how many of which size pages are available for use, and being robust in the face of changes to that availability. For the most part there have been very few programs which use hugepages because of this complexity, which in the past even had annoying features like essentially requiring one to reboot in order to change some of these system configuration settings. And it’s just been too hard for the programmer unless they’ve got a fairly simple use of memory, like a large static-sized shared memory region (ie: DB2/Oracle/MySQL).

Things have progressed massively though. Huge page usability on linux has gotten much easier thanks especially to kernel and userspace utility work Mel Gorman has spearheaded over the past couple of years. Mel’s got a series on LWN discussing these advances. The articles cover a bit of the technical details behind how hugepages give your programs benefit, how to use libhugetlbfs with your applications, and how new utilities in libhugetlbfs allow you to quickly and easily do things like manage multiple pools of different pagesized pages, test whether your application benefits from different possible hugepage backings and actually exploit those benefits even without rewriting your application specifically for huge pages.

While you might want the holy grail of an omniscient operating system that automagically always has your application backed by the “right” page sizes in the right places, what we have now can truly be considered user-ready.

Specifically the first part covers the background context of how hardware and low level operating system software deals with memory. The second part gives a quick introduction to some of the interfaces available for using huge pages with the different types of memory regions an application can have (eg: text, data, BSS, heap, stack, shared memory, anonymous mmap’s).

And…as a teaser:

Subsequent articles in the series will be getting into the key commands for hugepage pool management, running an application with hugepages in different configurations and showing off how easy it is now to test/profile an application workload to see if hugepages would provide benefit. Mel’s written up specific examples of testing a couple well known benchmarks with hugepages and discusses how (and how much) hugepages works for certain types of workloads.

Jeremy Allison on Sun’s death

Wednesday, March 3rd, 2010

I’ve poked at Sun repeatedly in past blog posts. While Jeremy Allison isn’t with Sun, he was once and understands why Sun did the things they did.

Linux systems from Red Hat and others ate Sun up from the inside out, by colonizing their customer base. Sun vs. the Linux world is a wonderful example of the weakness of proprietary licensing and trying to maintain control over software versus the GNU General Public License (GPL) and decentralized development model that Linux uses.

It’s not just Linux v. Solaris though. The same issues around user/developer community (ie: market) came up with Java, OpenOffice, MySQL, SPARC. Open source people talk about “community” and there are all sorts of ways to think about that vague term. But in the end, not being “community friendly” equates to not being friendly to your customer base and it hurts your market share over time. Jeremy’s blog post gives some nice examples of this.

It’ll be interesting to see what Oracle does going forward.

Multicore and no cache coherency

Monday, February 22nd, 2010

The talk today in Portland State’s CS colloquium series featured Intel’s Tim Mattson talking parallel programming and Intel’s research chips.

I’d followed the Intel press releases on their Terascale chip with a lot of interest. Turns out that was definitely meant as a research chip only to test some hardware, with all of maybe five people ever having written software for it and that seemingly as an after thought so the marketing would be able to say something more about the chip.

Just the last two months Intel Research has been making some press with their SCC chip (“Single Chip Cloud” computer…what a marketing name!). This one they’re aiming to actually get out into the hands of researchers. They’ve got a bare metal mode, a full linux kernel per core, and Microsoft’s announced something or other too. It’s particularly interesting though in how it is set up to leverage message passing and does not give cache coherency. It should spawn some interesting academic research in the coming year or two.

Mattson’s definitely of the mind that the way to deal with some of the central issues with scaling is to stop trying to have cache coherence. He makes pretty straight forward arguments. It’s interesting the parallels with distributed computing going back a couple decades even, both in basic programming and in reliability assumptions.

One point that struck me: He said that not many programmers are used to thinking in distributed terms and that most prefer a shared memory model. Probably most of HPC is looking at cache coherent single system images when you’re at the dozens of cores type scale…the scale of these research chips. Mattson comes from a chem background and certainly a number in the audience were HPC types. But maybe their marketing name actually has a bit of foundation in looking at the web space instead of HPC. If you look at today’s really popular web applications, they’re backed by a distributed software model using low end commodity systems that are assumed to be failure prone. So there’s a whole generation of programmers who take it for granted that if you scale up much you need to take the time to architect in a distributed way…they don’t just scale by adding/allowing parallelism and assuming they’ve got a giant machine with a single address space. Probably most of them don’t even program at a level where they know or care what an address space is!

The other thing I took away is that I should probably be paying a little attention to OpenCL.

An example of how Verizon’s Portland FIOS sale could go bad

Wednesday, August 26th, 2009

Three months ago I wrote about my worries regarding the sale of Verizon’s FIOS customers in the Portland area to Frontier Communications. Yesterday’s news brought a great example of what some smaller companies will do to get an opportunity to grow.

A large part of my concern about Frontier is whether they’re ready and capable of running a data network at the level FIOS customers have come to expect. While the current FCC bureaucrats thankfully seem to be heading towards enforcing network neutrality, that only covers active disruptions of service by the provider in order to create more billable events to the customer. It doesn’t do anything to insure that a provider is capable of providing reasonable latencies and bandwidths. If the Frontier sale goes through I will still have a 15Mbps dedicated data line, but it’s anybody’s guess what will happen as data goes through Frontier’s network. The Frontier network and its connections to the internet will matter more than the fibre coming into my house.

Given that Verizon had a stake in the Fairport sale going through, I have to attribute some blame to them, not just Fairport, for faking the Fairport network readiness testing done before outside auditors. Which then makes me quite skeptical of Verizon and Frontier assertions in the news media that Frontier is ready and capable and that service will not be degraded as a result of the pending sale.

Unfortunately, not many people are aware of these things or understand how they “get on the internet” and how it can go wrong. The Verizon FIOS service is really quite fantastic currently. There is a lot of room here for future disappointment. Comcast certainly sees the opportunity, is advertising heavily and working hard (seemingly with success) to lure people to what is ultimately a worse product offering.

My little AJAX summer project…a CWOP plugin for WordPress

Wednesday, August 19th, 2009

It’s still fairly lame in that it has no gui yet, but I’ve deemed my summer project for learning some AJAX to be ready for its first release!

My weather station sends its data to the internet. Currently the data goes to

  • CWOP (and from there it goes on to NOAA)
  • The WeatherUnderground
  • I wanted a way to do things with the data myself though. So I set about making a plugin for WordPress that will pull a weather station’s raw data from CWOP and dynamically update the current weather in a WordPress sidebar widget.

    The project lives here, is open source, and hopefully will continue to get some periodic tweeking over the coming weeks to the point where it has the ability to do minimal GUI display of the change in temperature, wind, &tc.

    If you’re reading this on my blog (as opposed to in a feed reader or some other aggregator like Facebook Notes), you should see the current weather in the blog sidebar…straight from my roof.

    It’s fun being a nerd!

My weather station finally is online

Tuesday, June 30th, 2009

Last year for my birthday we got a Davis weather station. For Christmas I got the data logger accessory and bought an NSLU2 to run linux and manage the data. I then got busy with school and work and didn’t get back to finishing after getting linux on the slug (which is impressively easy and well integrated). This week I finally got back to playing with it, got the linux install updated and tidied up, got wview built and mostly running. Last night I worked through a few minor bugs and configuration issues and today I see that my data is showing up on CWOP and Wunderground!

I know I’ve got the station sited well with respect to rain and wind, but I’m not sure if it’s going to be great in hot weather (subject to some radiant heat from below). But I’ll be able to compare that well on Thursday and Friday with other stations on wunderground given we’ve got a special weather statement for unseasonably hot weather. Out tomatoes, hops and marionberries are going to love some 90+ degree weather.

Longevity through BMI

Monday, June 29th, 2009

Finally I can stop caring that my BMI is consistently slightly above ideal! A new study says it light mean a longer life…

Sun kills Rock processor?

Tuesday, June 16th, 2009

Word is that Sun is dropping the Rock processor. Given the Oracle acquisition of Sun, which alone seemed to constantly be promising interesting tech this last decade and never quite living up to the promise, I’ve been wondering if together they’ll come up with plan that means a resurgence of Sun hardware and software and what especially will become of Solaris. Oracle on its own seemed to be betting big on linux the last few years. I guess how most of that pans out remains to be seen, but it sounds like at least on the hardware side their non-x86 hardware’s going away.

At a really technical level, transactional memory was supposed to be a big part of the Rock processor…I’m curious what this means for the future of TM? Given what I’ve read of it and the way it is actually implemented, I’ve never been convinced it is truly inherently better than what we currently have.

Verizon bails on (Portland, Oregon) FIOS?!

Thursday, May 14th, 2009

Verizon’s FIOS broadband service offering has been absolutely stellar in the roughly three years I’ve had it. And I’ve been quite happy the last few months with FiosTV feeding CableCards in my Tivo instead of some random crappy DVR. There have been a few billing oddities which have incurred the standard incumbent monopoly customer service difficulties in resolving, which is “normal” (unfortunately).

But I’m quite concerned learning today that Verizon’s apparently sweetened a deal with Frontier Communications to sell a bunch of rural land lands by adding in the Portland area FIOS internet/phone/TV customers. It’s hard to imagine this sort of a business deal working well for us customers.

Specifically, I can see it bringing:

  • worse TV channel selection
  • slower movement of channels to HD
  • higher compression of HD channels and lower video quality
  • lower peered bandwidth, ie: Verizon’s well connected to the internet…how will Frontier be? This aspect of provider-to-internet bandwidth can matter more than the 15Mbps they have dedicated between my house and their system.
  • higher latency, ie: Verizon’s well connected to the internet…will Frontier be? Currently I get the best ping times to various internet destinations that I’ve ever had at home. It’s hard to imagine a small, relatively capital poor company having the infrastructure Verizon has.
  • hypothetical service degradations due to Frontier network inadequacies leading to the “need” for a “fix” by way of instituting tiered-internet, non-network-neutral bandwidth capping and traffic shaping, eg: for instance having to pay extra to be allowed a reliable VPN connection to work.

This should be a fun transition. I wonder how long until Comcast starts calling offering me deals to switch? To bad they’re a non-starter due to their bad network policies.

TechShop comes to Portland area!!!

Friday, April 24th, 2009

My feed reader delivered this amazing gem yesterday: TechShop is opening a Portland workshop in Beaverton just off Hwy 217 and Allen. The grand opening is tomorrow at 3pm. Their list of available equipment and classes is unbelievably awesome. I really hope their expansion is successful…