Using video memory as a ramdisk in Linux

An old idea hit me again recently: Why can’t you use the memory that’s sitting unused on your video card (unless you’re playing Doom) as a ramdisk? It turns out you can, just not if you’re using Windows. Some Linux people have been doing <a href=”http://hedera.linuxnews.pl/_news/2002/09/03/_long/1445.html”>it</a> for two years.<p>Where’d I get this loony idea? Commodore, that’s where. It was fairly common practice to use the video RAM dedicated to the C-128’s 80-column display for other purposes when you weren’t using it. As convoluted as PC video memory is, it had nothing on the C-128, where the 80-column video chip was a netherword accessible only via a handful of chip registers. Using the memory for anything else was slow, it was painful, but it was still a lot faster than Commodore’s floppy drives.<p>

So along comes someone on Slashdot, asking about using idle video memory as swap space. I really like the idea on principle: The memory isn’t doing anything, and RAM is at least an order of magnitude faster than disk, so even slow memory is going to give better performance.<p>

The principle goes like this: You use the Linux MTD module and point it at the video card’s memory in the PCI address space. The memory is now a block device, which you can format and put a filesystem on. Format it ext2 (who needs journaling on a ramdisk?), and you’ve got a ramdisk. Format it swap, and you’ve got swap space.<p>

The downside? Reads and writes don’t happen at the same speed with AGP. Since swap space needs to happen quickly both directions, this is a problem. It could work a lot better with older PCI video cards, but those of course are a lot less likely to have a useful amount of memory on them. It would also work a lot better on newer PCIe video cards, but of course if your system is new enough to have a PCIe card, it’s also likely to have huge amounts of system RAM.<p>

The other downside is that CPU usage tends to really jump while accessing the video RAM.<p>

If you happen to have a system that has fast access to its video RAM, there’s no reason not to try using it as swap space. On some systems it seems to work really well. On others it seems to work really poorly.<p>

If it’s too slow for swap space, try it as a ramdisk. Point your browser cache at it, or mount it as /tmp. It’s going to have lower latency than disk, guaranteed. The only question is the throughput. But if it’s handling large numbers of small files, latency matters more than throughput.<p>

And if you’re concerned about the quality of the memory chips on a video card being lower than the quality of the chips used on the motherboard, a concern some people on Slashdot expressed, using that memory as a ramdisk is safer than as a system file. If there’s slight corruption in the memory, the filesystem will report an error. Personally I’m not sure I buy that argument, since GPUs tend to be even more demanding on memory than CPUs are, and the consequences of using second-rate memory on a video card could be worse than just some stray blips on the screen. But if you’re a worry wart, using it for something less important than swap means you’re not risking a system crash by doing it.<p>

If you’re the type who likes to tinker, this could be a way to get some performance at no cost other than your time. Of course if you like to tinker and enjoy this kind of stuff anyway, your time is essentially free.<p>

And if you want to get really crazy, RAID your new ramdisk with a small partition on your hard drive to make it permanent. But that seems a little too out there even for me.

Why I like MS Office better than OpenOffice

I saw a story on Digg talking about why MS Office is so much better than OpenOffice. The argument was pretty shallow–pretty much everything it said was either untrue or could be simplified to "because it is" or "because it costs money."

I’ve used both. I have both installed on a couple of machines. I generally use MS Office. Here’s why.For virtually everything I do, OpenOffice is fine. There’s no feature in Office 2000 that I actually use that isn’t in recent builds of OpenOffice. None. I wrote a book in Office 97, and the only thing that would keep me from writing the same book again in OpenOffice might be the template I used. If OpenOffice could interpret my old publisher’s template and save it in a format my editor’s copy of Word could understand, I’d be OK.

And honestly, I think during the process of writing that book, I pushed my system a lot harder than most people do. Word 97 would crash hard on me once or twice a month, and I don’t think anyone else has ever done that.

I’ve never crashed Word 2000. I don’t know if it’s because Word 2000 is more stable or if it’s because Windows 2000 is a lot more stable than Windows 98 was. I never ran Office 97 on Windows 2000.

My complaint with OpenOffice is speed. Word launches in five seconds or less, even if I don’t have its quick-launch application in memory. Usually less. OpenOffice components load slowly, sometimes taking 30 seconds to load. If I wanted to wait 30 seconds for my word processor to load, I’d use my Commodore 128.

And while I can’t quantify it, once Word is loaded, it’s faster and more responsive. OpenOffice Writer seems to hesitate just a fraction of a second longer when I pull down a menu or hit a hotkey. There’s not a lot of difference, but it drives me nuts.

I’m spoiled, I know. I used to use a word processor called TransWrite on my Amiga. There were a lot of things TransWrite wouldn’t do, but it was lightning fast. Even on a 7 MHz Amiga, it did everything instantly.

I can’t speak for anyone else, but what I want is something that gives me all the features of, say, Word 95, and runs as fast as TransWrite did. Given that 1 GHz is considered a slow computer nowadays, I don’t think that’s too much to ask. Neither OpenOffice nor Microsoft totally deliver, but Microsoft’s product comes a lot closer.

I absolutely, positively do not buy the argument that MS Office is more capable. Microsoft’s eternal struggle has been figuring out how to get people to upgrade their old versions of Office, because frankly when I started working in desktop support in August 1995, the existing Windows 3.1 versions of Word and Excel did everything that the people I supported wanted, even then. When I became a full-time IT worker in March 1997, one of my first jobs was rolling out Office 97. Its draw was that it was 32-bit and crashed less. It had some new features but aside from the real-time spelling and grammar checking, nobody really talked about them. Some people loved the real-time checks, and other people fell all over themselves turning them off.

Two years later, Office 2000 came out. A hotshot in the accounting department told me how much better it was, but when we really talked about the new features, his opinion was mostly due to the excitement of being the first to have the new version. Outlook was considerably better in Office 2000 than it had been in previous versions, but outside of that the only new feature I ever heard anyone mention was that the font menu displayed font names in the actual font. Access was better, but not a lot of people used it.

I’ve used Office XP and 2003. Outlook was incrementally better in both versions. But aside from Word’s booklet printing capabilities, I’ve never found anything in the newer versions of Office that I miss when I come home and use Office 2000 on my now-ancient computers.

And whenever I shift gears from Office 2000 over into OpenOffice, a few obscure features might be in a different place in the menu structure but I’ve always found what I needed.

But if for some reason I had to ditch MS Office tomorrow, I wouldn’t switch to OpenOffice. I’d load the Windows versions of AbiWord and Gnumeric.

In some regards, AbiWord and Gnumeric are closer to the 1992 versions of Word and Excel when it comes to capabilities. But they’re fast. And I’ve always been willing to sacrifice a few capabilities for a program that can operate as quickly as I can think. My only complaint about those two programs is that I never figured out how to make .doc and .xls the default file format for them.

How I became interested in system optimization

I’ve talked system optimization a lot over the past week. I think I’m done for now, so I’ll talk about why you would want to do these things, and how I got interested in it.My first computer was a Commodore 64. With Commodores, all optimization was software. The hardware was all finely tuned and the timing was precise, so you couldn’t just ramp up the clock speed of the CPU to make the system go faster. But there were lots of things you could do in software to do things like improve the speed of the disk drive.

I moved to an Amiga in the early 1990s and I became interested in a project called ARP, short for AmigaDOS Replacement Project. The Amiga had a command line, and its command line tools were mostly ports of old tools from an obsolete operating system called Tripos, written in BCPL, a predecessor of C. ARP tools were written in either C or 68K assembler and gave the functionality of the originals, but they were smaller, so they loaded and ran faster. I always looked for ways to make my Amiga run faster and use less memory.

In 1994 I took a job selling PCs. My boss talked about how his 16 MHz 386sx felt more responsive than the 33 MHz 486s we sold so many of. So I started learning about PC optimization too. There was a lot you could do just in software.

So I’ve remained interested in this idea for probably 20 years.

Just this week I put an old Windows ME box through the regimen, and it’s definitely a lot peppier now.

I talked about registry optimization and file cleanup, defragmentation, antivirus, firewalls, and defragmentation again.

Do these things, and in most cases you can squeeze at least an extra year out of the life of a system. I squeeze more like five.

The little-known story of Commodore

So I’m reading On The Edge, a longish book that tries to tell the story of Commodore properly, including the people who made it happen, and the companies it bought along the way.

I’m glad the story got told.

Read more

How to get a Commodore 64 for $20

In 2006, Radio Shack sold a Hummer racing game based on Jeri Ellsworth’s C64-on-a-chip design.

A number of people spent time figuring out how to turn the Radio Shack game into a full-blown C64. There is a FAQ available.One cool thing about these is that it’s very easy to add a PS/2 keyboard to them. Having a C-64 with an IBM Model M keyboard sure sounds nice…

I also found a forum dedicated to this and other Commodore-related topics.

Ah, memories…

How to get my job (2006 edition)

It seems like every year or two, somebody asks me how to get my job. Given the way the last year or so has gone, I can’t believe anyone’s asking me that question, but it’s been coming back up again. I’ve made some mistakes in my career–obviously–but since I’m still in the field, I must have done a few things right too.

I guess it makes sense to trace my career and see what I would do differently.1984: Yes, it all started when I was 10. I’d wanted a computer for as long as I could remember, and that year, Mom and Dad finally bought one. I spent as much time messing with that old Commodore as I could. And when I wasn’t messing with that Commodore, I was reading about it. It was an obsession. It bordered on unhealthy. Or maybe it was unhealthy.

In high school, if you’d offered me a choice between a date with the best-looking girl in the school or a new Amiga 1200 or 3000, I might very well have taken the computer. Sure, I was interested in girls, but the computer wouldn’t break up with me, right?

I bring this up for one reason: If you’re wanting to get into the field for money, find something else to do. Go into sales or something. If you don’t absolutely love this stuff, you won’t last, so there’s no point in wasting your time.

1994: I started my career in sales. When polite company isn’t around, I say I whored myself out for a large consumer electronics chain. That might be a bit more accurate. In a way it was a good move. A lot of IT people my age started their careers the way I did. It’s better than fast food, at least in regards that IT recruiters use it as a scouting ground. Work there and do well, and it’s just a matter of time before recruiters will want to talk to you.

What I did right: I started filling in for the store’s technician, who frequently had problems showing up for work.

What I’d do differently: First, I’d find out who the best salesperson was, and really learn how to sell. I’ve worked with IT management people who couldn’t figure out how to make their computer play solitaire, but they know a little bit about selling, so their jobs are safe, even though they had no qualifications.

The other thing I’d do differently is to get A+ certification. It’s not strictly necessary to get a better job, but it opens more doors. A lot of jobs require A+ certification just because some idiot in HR (and yes, most of them are idiots) decided it’s a good idea.

1995: I caught a break because I knew both Macintosh and IBM hardware, I knew OS/2, and I had connections at the journalism school at the University of Missouri. A professor mentioned the job opening to me and handed me a phone number. After class I called the number. The guy on the other end asked me what I knew how to do. I told him, he told me he’d pay me $7 an hour, and asked when I could start.

It was supposed to be a temporary gig. But it turned out I knew how to do a lot more than just the grunt work that needed to be done, so they found money to keep me. And when I was about to graduate, they offered me a full-time job.

What I did right: I showed up for work, I did everything they asked me to do, and whenever somebody else was sick and they asked me to try to fill in, I filled in and actually managed to do a decent job.

What I’d do differently: It wasn’t a bad gig, until Yoko Ono came along. Actually she was from Pittsburgh and she was Scottish-American. But the relationship interfered with the job and the job interfered with the relationship. And when something went wrong with one, it messed up the other too. I’d have done well to learn how to separate the two. That’s a lot to ask of someone who’s 23. Now I’m 31 and don’t know how now either. Neither does my 40-year-old boss.

1998: I moved to St. Louis to take another job in IT. This was also the year I re-discovered God and religion. This was a dream job, working for my church. I took a demotion and a pay cut to do it. Of course I didn’t know until I’d already quit my other job that it was a demotion.

I’ll get off track if I talk about it much more than that, so let’s just talk about what went right and wrong.

What I did right: I racked up a lot of impressive statistics and I learned how to do everything they asked me to do. I usually wasn’t happy about it, but I always did as well or better than the person who replaced me. The guy I replaced was a legend and I don’t think anyone would have been able to replace him adequately.

What I did wrong: I shouldn’t have taken the demotion. Not at 23. If you’re married and have kids, I can see taking a demotion so you can work better hours to spend more time with your family. When you’re 23 and single, you can’t waste time climbing a ladder you already climbed once. A banker in Columbia offered me a job as a systems administrator when he found out I knew OS/2. I should have taken it and called St. Louis and told them I wasn’t coming.

This job really went downhill as another relationship was coming to an end too. No need to re-hash that.

I made one other mistake. I won’t elaborate on it. But if you see upper management doing something unethical, LEAVE.

2005: Mercenary time. My first contract was with a very large and very nearly bankrupt cable company. The work wasn’t nearly as interesting or challenging as my previous job, and my coworkers were at either extreme: Some were among the very best people I’d ever worked with, and some of them were just overgrown high school bullies. But it was work, and the pay was fair, which was nice after working for seven years at anywhere from $15,000-$20,000 less than I was worth. Making a double mortgage payment and still having more money left over at the end of the month than I’d had a year before was very nice.

What I did right: I came in, learned quickly, took things seriously, was very professional and very effective.

What I did wrong: I didn’t press in. I did what I was asked, and that was it. That’s what a hired gun does. And the result was I was treated like a hired gun. As soon as the money got tough, I was the first one out the door.

I had coworkers who didn’t want me to learn more about the system. Since they didn’t want to show me, I should have found another way to learn it. And I should have loosened up.

2006: I won’t tell you who I’m working for now, other than to say it’s someone you’ve definitely heard of.

This time, I made an effort to go to lunch with my coworkers. I didn’t do that at the cable company because I was trying to save money. I’d gone without enough money for a couple of months and was deathly afraid of having to do it again. I’m still a tightwad and everyone knows it, but I’m willing to spend $7 to bond with my coworkers once a week. The theory is it’s a lot harder to show the door to someone you like than to someone you barely know.

The other thing I did this time was to steal some responsibility. I volunteer for everything. Sometimes they end up giving it to someone else anyway. But I’m always willing. When people give me some of their old responsibilities, I take them, and I figure out how to do them faster and smarter. After about two months, now my boss is surprised when I do something his way.

My path isn’t the only path. There are two previous bosses I wouldn’t hesitate to work for again. One is a retired U.S. Marine. He went into the Marine Corps as a technician, fixing teletype machines. When teletypes became less important, he moved on to computers. When he retired, he kept on working for the military as a contractor.

Most of my coworkers today took a similar path. Some enjoyed very long careers as defense contractors after their military days came to an end.

That seems to me to be a good route to take if you don’t have a lot of connections. And the upside to the military approach is that you know your job won’t be outsourced to India. That’s a real danger and that danger is going to get a lot bigger before it gets any smaller.

The other previous boss has a degree in psychology. He started working with computers because he found them interesting. I don’t know how he got started in the field, but during the time I worked for him, he was the epitome of connections. He knew everybody, and whenever something goofy came up, he knew how to get in touch with them to get the answer. The result? He’s every bit as entrenched as a tenured professor would be. The difference is there’s no question as to whether that’s a good thing.

Myspace and blogging isn’t inherently bad

I see some schools are blocking access to Myspace and other blogging tools. The blogosphere, some people seem to believe, is just a bunch of people looking to exploit teenaged girls.

Sure, blogs can be dangerous. So can cars and jobs. I think the Myspace phenomenon exposes weaknesses in upbringing more than anything else.Blogs have only been around for about 9 years so there haven’t been a lot of sociological studies of them–especially since blogging has only been hot for the last couple of years. But there are precedents.

I was very active in a lot of online communities as a teenager. Teens like me were a minority, but there were enough of us. I’m still friends with a couple of people I met online back in those days.

And I’ll tell you something straight up: I ran into a lot of women who were older than me. A lot of, um, lonely women who were older than me. A lot of them had the wrong idea about my age. One asked me where I went to college. But you see, I hadn’t gone yet, because I was only 14.

And in case you’re wondering, it didn’t go any further than that. I’d been taught right from wrong, and I carried myself that way, both online and in person, so the topic never came up.

There were other dark sides of this online world. Software piracy was usually the gateway. And yeah, I’ll admit I downloaded some software that I didn’t pay for. Mostly I stuck to things that were no longer commercially available. And without Amazon.com and Ebay, it was difficult to buy out-of-print stuff. So I wouldn’t have been able to buy the majority of it even if I’d wanted to. That didn’t make it legal, but to my teenaged mind, it sounded moral enough.

Of course most people were interested in the new stuff. And that could lead down a slippery slope. St. Louis wasn’t exactly a hotbed for the latest new releases, so to get the zero-day warez, you had to call long distance. But remember, most of us weren’t 16 yet, so we didn’t have jobs and we didn’t have a lot of money. So I knew an awful lot of people who got into phone fraud. And it often got worse from there. Phone fraud led to credit card fraud, and I heard stories of people who got caught, slapped with the huge bills they’d run up, and turned to dealing drugs to make the money to pay it back.

All so they could be the first one in St. Louis to have the Commodore 64 version of Grover’s Magic Numbers. Yes, there were people who risked all of that to have something that lame-sounding. And no, it didn’t sound any cooler then, but people did it.

I talked with a number of people who were caught up in that. There was a guy in Chicago who called me on a pretty regular basis for a little while. No, he didn’t dial 1-314, if you know what I mean. One day he quit calling, and not long after that, I heard the Feds caught up with him. There was a rumor that he ran away to Colorado after he got out of juvenile detention. Whatever the case, I never heard from him again.

But I never made any fraudulent long-distance calls. I had a 3.6 grade-point average, was in National Honors Society, and I was in Who’s Who Among American High School Students all four years. And I sold my first magazine article before I got my driver’s license. I wasn’t going to throw all that away just so I could make long-distance phone calls on someone else’s dime.

So why was I having anything to do with those people? Simple. We talked programming. Nothing I learned from those guys is remotely useful to me today, but it was interesting then. Sure, those guys made a lot of mistakes, and yeah, they sure did break a lot of laws, but they weren’t entirely bad.

I’m sure if my parents had known everything that was going on, they’d have gotten rid of the modem or at least severely limited what I could do with it. But they couldn’t stand over my shoulder all the time.

And besides, there wasn’t any need to worry. They’d taught me right from wrong, and what I had to lose if I stepped too far out of bounds. Sure I pushed the limits, but that’s being a teenager for you. Come to think of it, I still push the limits sometimes now, even at 31.

The primitive online communities that existed in the late 1980s and early 1990s were social communities. The only difference between that and the mall was distance. The computer took away the geographical boundaries. In that regard they’re the same as Myspace and other online communities today.

There’s potential for problems today, just like there was 17 years ago. But looking back now, there’s no question why I went online back then. It helped me deal with being a teenager. I could talk with other teenagers who were like me–there were only one or two others like me at my school, and one of them was a major-league jerk. And I could get advice from adults who were further removed from the situation and could give me advice without conflicts of interest. Whether the struggle of the day involved a soldering iron or a girl, I knew at least one person who knew the answer.

I can think of lots of things I’d change if I could go back, but that isn’t among them. So I don’t believe isolating kids today from online communities solves anything. Kids will be kids. Hopefully they know right from wrong and what they can lose if they choose wrong.

Blocking those who would choose wrong doesn’t solve a lot. They’ll find another way to choose wrong.

Denying an important resource to those who would choose right is a greater loss. It’s much easier to find another way to choose wrong than it is to find another way to get wise counsel.

Should you edit your boss’ Wikipedia article?

The IP block associated with congressional offices has been banned off and on from editing Wikipedia, due to a large percentage of dubious edits that attempt to clean up a Congressperson’s image, or smear political opponents.

This has raised a question: Should people with vested interests edit articles?

Absolutely not. And lack of a foolproof way to keep them from doing that is one reason it’s not a reliable source.

Read more

Speeding up Openoffice

This week the usual sources were flooded with stories about how slow and bloated Openoffice is. I guess this came on the heels of the release of version 2.0; it’s never been much of a secret that Openoffice was big and slow. It’s descended from Staroffice, after all, and it was big and slow too.

Speedup tips ensued.

Read more

Total retro overload

OK, so first I find out that Quantum Link has been reverse engineered and resurrected, and then I find out there’s a darn good C compiler for 8-bit computers, including Commodore, Apple and Atari. It’ll even compile GEOS (the Commodore GUI) programs!

Read more