SAN FRANCISCO – Your laptop is a couple of years old, and you’re not particularly happy with its performance anymore–but you aren’t ready to spring for a new one. What to do? You’ve probably considered upgrading your portable Mac. But what, exactly, should you upgrade?

To start, you should focus on the Big Two of laptop upgrades: the memory and the hard drive. Sure, you can upgrade other components, particularly the optical drive and, in some cases, the CPU. But RAM and hard-drive upgrades can both dramatically increase your laptop’s usability, and both are doable for the average Mac owner.

Thanks for more memory

Adding RAM is the fastest, easiest upgrade you can do, and it will give you the most bang for your buck. You probably know the signs of a RAM-deprived Mac: Your machine works great while you’re browsing the Web and reading e-mail, but when you open a program like Adobe Photoshop, you see the spinning beach ball.

When the operating system can’t fit the application code and your data in physical memory, it swaps the excess data to the hard drive. Because disks are slower than RAM, that swapping slows performance. Memory upgrades can be particularly helpful if you run high-end applications–such as Photoshop–that work with huge data files. For example, Macworld tested the effects of RAM upgrades on a Mac mini. In Photoshop, tasks that took seven minutes to perform with 256MB of RAM took about two minutes when that RAM was upgraded to 512MB–that’s a pretty dramatic improvement.

If you think you need more laptop RAM, you can get some at a relatively inexpensive price: a 512MB module can be had for around US$70; 256MB, for as little as $40 (this varies by model, of course).

Installation is simple (particularly with aluminum PowerBooks and the MacBook models): Just shut the computer off, remove a few Phillips screws, drop the new RAM in, and replace the screws. When you turn the Mac on, it should immediately recognize the new memory.

Exact installation procedures vary by model. (With MacBooks, for example, Apple recommends that you install RAM in matched pairs for best performance.) For specifics, check out Apple Support . Usually, the only trick is making sure the RAM you buy is compatible with your particular Mac.

Speed and storage

While more RAM can easily increase a laptop’s performance, a new hard drive may also give you a speed boost, while also giving you more storage. Let’s say your iBook came with a 20GB drive rated at 4,200 rpm. For about $130, you can replace it with a 60GB, 7,200-rpm drive. Throughput on the stock 4,200-rpm drives generally tops out at 20 MBps, but the 5,400-rpm drives max out around 30 MBps, and the 7,200-rpm drives top out at about 40 MBps.

For people who value space over speed, the largest laptop hard drive currently available is a SATA 4,200-rpm 200GB model from Toshiba . Fujitsu has also announced production of a SATA 200GB drive, but it is too thick to fit into the MacBook line. Faster drives have a reputation for being noisy and causing poor battery life. True, 7,200-rpm drives pull about 25 percent more juice than comparable 5,400-rpm drives and make a bit more noise, but you’re not likely to notice either in real-world use. What you will notice is the price: Right now, 7,200-rpm drives cost about 50 percent more than 5,400-rpm drives of the same capacity.

Another consideration is physical size. Until the MacBook came along, all Apple laptops used 2.5-inch ATA drives. (That measurement refers to the drive’s width; you’ll also see references to height, such as 9.5mm drives.) Although some older iBooks and PowerBooks can accommodate taller drives, 9.5mm is the standard and works in everything. Drives in the new MacBooks and MacBook Pros are the same physical size as those used in older Mac laptops, but they use the faster SATA connection; that standard isn’t interoperable with the older ATA connectors, so you can’t put a SATA drive in an older Mac.

Hard-drive installation varies widely in difficulty. With the new MacBooks, it’s insanely easy: just remove the battery and three screws, swap the drives, and replace the screws, and then you’re done. (See the video .) Older iBooks are significantly more challenging, 12- and 15-inch PowerBooks slightly less so, and 17-inch PowerBooks and MacBook Pros are even easier (though still not as easy as MacBooks). Because of that diversity, it’s impossible to give even general instructions here. Apple’s manuals and Web site are both silent on the topic, so you’ll just have to search the Web.

Tricks of the trade

Before you start any upgrade, make sure you have the right tools: Phillips 0, Phillips 00, Torx T6, and Torx T8 screwdrivers are most commonly required.

Some upgraders worry that messing with their machines will void their warranties. In some cases, it may. Apple’s warranty states: “This warranty does not apply to damage caused by service (including upgrades and expansions) performed by anyone who is not a representative of Apple or an Apple Authorized Service Provider.” This means that your warranty will still be valid if you install a new hard drive yourself–as long as you don’t damage anything. In fact, in an effort to control costs, Apple has increasingly been asking Mac owners to perform warranty fixes–the company ships you the replacement part, and you have to perform the repair yourself. If you do damage something, the warranty won’t cover that damage; however, you should still be eligible for coverage for other, unrelated issues.

Of course, if you don’t want to worry about warranty issues, you can always buy your upgrades online, and then take them to a local Apple technician, who can install them for you.