Broadcom B57nd60x 10.10.0.0 performance problems (Dell XPS especially)

CPU spikes were making my laptop less fun to use – a nice online guide and a quick bit of sleuthing with MS’s sysinternals tools and I soon had the answer. The laptop is now faster, quieter and has better battery life.

Excuse the title, but may as well make it easy to find.  I’d been experiencing problems with performance, whilst networking, with my Dell XPS M1330.

CPU Spikes

Basically, the CPU usage was spiking on a regular basis.  I could feel when playing games, and it was annoying.  It had started relatively recently, and the precise cause was unknown.  However, a bit of Googling and I found Mark Russinovich’s excellent overview of using Sysinternals Process Explorer and Kernrate to track down the root of this kind of spiky CPU usage.

And my problem was exactly the same.  Same driver, same version – the B57nd60x 10.10.0.0 driver was gobbling up CPU at a frightening rate.  However, although he’d reported the problem, at the time there was no solution and a new driver wasn’t available on the Dell website.  A year later, the driver still isn’t available – the Dell driver is resolutely stuck at v 10.10.0.0 – so, no fix.

Excessive CPU consumption = poor battery life

But it’s annoying seeing your CPU running constantly at 20%.  It also has an impact on battery life.

So I looked around a little further and found an updated driver to download at the the broadcom site, for version 11.7.3.0 – surely this would have a fix, as Broadcom were aware of the problem thanks to Mark’s excellent work.

And it worked – the screenshot below shows the impact – the first third or so shows the CPU usage with the old driver, and then it drops dramatically:

broadcom_driver_performance

That Dell haven’t updated their driver pack in over a year is something of a support fail – it makes the XPS M1330, at least in certain circumstances, somewhat less of a great PC than it could be.  And it’s also poor for the PC community – a lot of criticism is made of Windows being something that slows down over time.  It’s rarely the fault of Microsoft – often it’s driver issues, but finding the latest drivers isn’t easy for everyone, and it’s quite technical to solve.  MS could possibly make driver management a simpler system, but the PC makers could help by keeping up to date driver packs – especially for laptops which are rarely modified.

PHP Serialization Fix for WordPress Migrations (& other applications like Expression Engine)

Serialization of data loaded into an SQL table is a dreadful thing and makes WordPress migrations harder than they should be, but it happens and so we must deal with it. I’ve knocked up a rough and ready bit of code which does its best to resolve the problem.

When you move a WordPress blog from one folder to another, or from one site to another, you normally use the export/import functionality.

This is fine for normal blogs, but say you’ve developed a new website and set it up on your local machine – the URL for the site may be something like http://localhost/devsite and the live URL will be something like https://davidcoveney.com – you won’t want to set up all the theme options, site options, plugin options and so on all over again.

A different kind of migration - public domain from Wikipedia Commons
A different kind of migration – public domain from Wikipedia Commons

Instead, a theoretically simple approach is to do a database dump, a search and replace for all references to server paths and URLs, and then reimport that data in the new location.

Should work, but it often falls apart.

What happens is that in WordPress, its themes and its plugins, a lot of data is stored using a method known as serialization.  Now, in my opinion this breaks all known good practice around data – it’s language specific, it’s not relational even though it often could be, and it’s hard to edit by hand.

One particular problem is that if you change the length of the data in a serialised string you have to change the length declared in the generated string.

That’s very painful when you have hundreds of the fields.

So, because I’d found this painful I decided to knock together a quick application to at least reduce the amount of editing I had to do.  You just do your search and replace, forget about the serialized string lengths, upload your data to the new database, and run this script.

Warning: I haven’t got it to work for widgets and cForms II yet, but the latter has some export functionality anyway, which takes that particular pain away if you plan ahead.  In the meantime, feel free to play with the attached file.  You use it at your own risk, of course.

To use it, download the file linked in this post, extract it, open the file, edit the connection settings, tell it the table you want to scan through, the column, and the unique key field.  If you somehow manage to have more than one unique key to deal with (you shouldn’t, but then it surprises me what people manage to code up), then you’ll have to modify the code accordingly.  Once done, make sure you have a backup of that table, and execute the php – either at the command line or through the browser. License is WTFPL, and if you’d like to improve the code, please do and I’ll host the new version.

Serialization-fixer.zip download.
download file

Serialization-fixer.zip download

BIG WARNING: I take no responsibility for what this code does to your data. Use it at your own risk. Test it. Be careful. OK? Here in the North we might describe the code as being as “Rough as a badger’s arse.” Never felt a badger’s arse, but I’ll take their word for it.

Wordcamp UK 2009 to be in Cardiff

20090224-mp54k2h4uu7ada1jtkycce81qiIf you’re following the various WordCamp lists, you’ll already know about this event.  But many won’t.

If you use WordPress professionally, or with a great deal of enthusiasm, WordCamps are a great way to meet with other users, developers and designers who really understand the system.  There are useful presentations, social events and activities based around the event.

I was there last year at the Birmingham WordCamp, with James, and our company Interconnect IT was one of the sponsors.  This year we’re waiting to see how finances work out before throwing in sponsorship money, but I’ll definitely be there again and I’m likely to be presenting on the issues surrounding bringing WordPress to the enterprise space.  Because corporates love WordPress too…

This year’s event will take place on the 18th to the 19th of July at the Future Inn Cardiff Bay, Cardiff, Wales.

For more information, you can visit the official WordCamp UK Site.

Pros & Cons of Software as a Service

SaaS rocks, but it’s not the be all and end all. But it is hot right now (again) and will continue to be so for quite some time. However, Rich Internet Applications (RIAs) driven by the likes of Flex and Silverlight could be returning us to a Client Server paradigm and is probably the way forward – bringing SaaS and local processing benefits to users.

Google Docs - still Beta
Google Docs - still Beta
I just responded on the UK Business Forums to a question about SaaS and felt that it was worth re-posting the content here:

As someone who’s worked on web delivered applications for around eight years, and on client/server and mainframe (which is actually like very thin client) I feel reasonably qualified to point out a few pros and cons of SaaS:

Pros

  1. Deployment – in either corporate or SME environments this could be a nightmare. MS have it pretty well sussed these days, however, while Apple don’t. Which possibly explains why a lot of key SaaS proponents are Apple OSX users.
  2. Cashflow – short term costs are easier to manage.
  3. You’re always up to date – updates are continuous and rolling.
  4. Data is stored and managed by professionals who hopefully know what they’re doing with regards to security and integrity.
  5. Harder to lose data when a laptop goes missing.

Cons

  1. Performance & Productivity – it’s definitely worse for end users although many will argue it’s fine. It’s getting better, but it’s still worse – especially for expert users. I remember how quickly expert PeopleSoft users could input data.
  2. Because of 1, designers do have to concentrate hard on slick usability, but that means flexibility has a habit of dropping.
  3. If you’re offline it’s a royal pain – methods of getting around this are improving, somewhat, and MS again appear to have some very good tech coming in Windows 7 to make working this way more feasible, but for the moment it’s still a major weakness in all but a few sophisticated cases.
  4. You can be very much locked-in to a provider, far more easily than with local software, and there’s very few SaaS services that are open source. Even fewer where the export/import tools are 100% seamless. Even switching from WordPress.com to self-hosted can be painful for some.
  5. You have to trust your provider and hope they don’t mess up. MS did a contacts screw up with Hotmail a while ago during an upgrade which affected a small proportion of their users – they kept e-mail addresses, but lost names and other information. And when something is ‘free’, especially, it’s very hard to kick up a stink. In fact, it’s worth noting that a lot of these services have an ‘at your own risk’ policy in their licences. To be safe you should be backing up your online data somewhere offline, which is painful.

SaaS rocks, but it’s not the be all and end all. But it is hot right now (again) and will continue to be so for quite some time. However, Rich Internet Applications (RIAs) driven by the likes of Flex and Silverlight could be returning us to a Client Server paradigm and is probably the way forward – bringing SaaS and local processing benefits to users.

Another thing I’ll add, which I didn’t bother mentioning on the forum, is that you’ll never get the flexibility of a local application with SaaS. The power and bandwidth simply isn’t there, and never will be. My computer can transmit data internally at multiple Gigabit speeds. By the time that kind of broadband exists at a low price for mass adoption most computers will be transmitting data internally at Terabit speeds. For the ultimate in performance you’ll always want local applications. For connected, multi-service and convenient applications you’ll want to go over to SaaS. Both will co-exist, just like Client Server failed to kill off the mainframe.

iPhone Blogging and WordPress

As anyone who knows me can confirm, I’m always interested in the latest tech and software. So at the WordCamp UK at the weekend I was interested to learn about a new iPhone client for WordPress. And this is the result.. I’m blogging by phone.

Ok, so it’s not perfect…formatting is limited and the picture ends up browser sized rather than using a correctly sized thumbnail. But it’ll have it’s uses..both in journalism sites and for keen personal bloggers.

I’m also having a fiddle with WP2.6’s new image handling features, so what you see above isn’t exactly what the iPhone did, but close.

21 Years In IT

I chanced upon a site listing the first 100 .com registrations ever made – and it rather startled me.  I started my IT career in 1987, first working as a printer operator on the mainframes at ICI, before moving to systems operations in at the beginning of 1988.  Later in 1988 I became a trainee programmer (my career never moved as fast as that first 12 month period!) and so I continued.

So when I took my first tentative steps in professional IT there had been fewer than 100 .coms registered.  Today there are over 76,000,000 active domains and over 280,000,000 that have been deleted, according to Domaintools.com.

Things have changed markedly in this industry.  21 years is nothing.  The internet has quite literally exploded around us.  I started surfing the World Wide Web in 1993 and frankly there was nothing much there.  It was hard to find sites, and performance was painful.  Running your own site was difficult, and it wasn’t until 1996 that I first registered a domain – at-speed.co.uk with the intention of creating an online resource for motorsport news.  It was a difficult but exciting experience, but I felt that it was too early – the Internet wasn’t really a mass market item yet, even though the potential was starting to be realised.  I had bugger all money at the time too, so needed to go out there and get a better paying job.  Interestingly I used to get e-mails from the UK Motorsport Index (which still has the same design as it did then!) complaining about our high budget approach being against the spirit of the web.  I doubt he realised that we had absolutely no money and everyone contributed their work for free.  One thing that was as true then as it is now is that good <> expensive.

So now where are we?  We have applications delivered via the browser, high performance search engines that actually work, and we enjoy the power of a huge number of free social services.  Many of these services are heavily funded and will require monetisation at some point, or they’ll close… that could be interesting.  Google managed the transition from a giveaway to a fee earning service without ever charging the people that made it successful.  Can the likes of flickr, Facebook and WordPress.com?

Time will tell…  What’s certain is that the pace of change, so marked over my career, is probably going to continue accelerating.  The next 21 years could be as equally fascinating…

Reducing Nokia N95 GPRS Map Charges

I’ve been thinking about buying a Nokia N95 – lovely looking phone.

Anyway, thanks to the wonders of Norlog I’ve got hold of a document that helps you to make sure that if you want to use the Satellite Navigation you won’t get hit by heavy roaming charges. It describes how to set up the phone so it won’t download maps willy-nilly (fine on T-Mobile’s excellent Web n Walk tariffs though) and how to get the maps in other ways.

Nokia N95 Basics – pdf file

Thanks go to Rich. Unless asked by him I won’t put any more info in case it gets anyone into trouble.

Migration Successful! Well…almost…

Incredible! I’ve just migrated the website across from the Yahoo server to our own server in the UK. Total outage time of less than half an hour. Incredible. Could have been better but Yahoo! don’t allow you to detach your domain from your hosting package without closing down your hosting. Still, it’s done now.

The key advantage should be that all users in Europe should see a dramatic improvement in performance. US users will see a bit of a slow-down. As visitors (nearly 5,000 a month now!) are spread around the globe it shouldn’t make much difference on average, but for me, the person who has to write the content, the site will be much quicker to use as I’m usually in Europe. Therefore updates should be just that little bit easier and quicker for me. Yay! I’m one very happy bunny….

Now to sort out the e-mail accounts. I just added the ‘almost’ bit to the headline as I’ve discovered that accented letters, and some commas, have been corrupted in the migration. Encoding issue somewhere, darn it. Bit of a case of the cobbler’s children here, because had I been doing this professionally it’s the kind of thing I’d have carefully checked for. But it’s my personal site, so of course I paid it no attention at all. Oh well! Some nifty SQL coming up, I think.

Test of tables with new editor
Good heavens!  It works Really quite well
Though sizing isn’t as easy as in Word It’s not bad