How To

How to minimize your risk of prostate cancer

A long-time friend who does research into complementary and integrative medicine and is a wiz with statistics — his name is John Lewis — has just published an article entitled “Intake of Plant Foods and Associated Nutrients in Prostate Cancer Risk” where he, along with other researchers, found that your risk for prostate cancer becomes significantly lower if your diet consists mainly of vegetables, fruits and/or fruit juices.

On the other hand, if your diet has an increased amount of protein — or, interestingly enough, daily servings of grains — your risk for prostate cancer is increased. Another finding of his study ties into the racial/ethnic differences in the incidence of prostate cancer, which happens to be higher in African-Americans. The study shows a strong link between dietary intake and the risk of prostate cancer. Caucasian controls had significantly higher daily servings of vegetables and fruits and/or fruit juices compared to their African-American controls, and their incidence of prostate cancer was lower. Thankfully, the study found that those who changed their diets significantly to include more fruits and vegetables stood a better chance of surviving prostate cancer, regardless of race or ethnicity.

The lesson to be learned is simple: eat your fruits and vegetables if you want to keep away prostate cancer.

I should mention that he is also a CFS (Chronic Fatigue Syndrome) survivor. He was bedridden for over a year because of CFS. He cured himself by changing his diet to include only vegetables, fruits, nuts and grains, by exercising regularly, and through special intra-venous vitamin boosters — a treatment called chelation therapy.

Standard
How To

New Gmail buttons and shortcuts

Gmail's new buttons

I woke up today to find new Gmail buttons. At first I thought it was just Firefox playing tricks on me, but no, the buttons look the same in Safari. The Gmail Team announced the change on their blog yesterday, on 2/3/09. As expected, the change took a while to propagate to all of the Gmail accounts.

Along with the new buttons, they introduced two new keyboard shortcuts, “l” and “v”, which will allow you to label and label/archive messages on the fly. The “l” key opens a drop-down menu which allows you to label emails. You can navigate the drop-down menu using the arrow keys and mark a label using the Enter key. The “v” key does the same thing, and it also archives the message at the same time, removing it from the inbox.

Don’t forget that while you’re in the Gmail inbox, you can select multiple message by using the Shift key. Left-click on the first one, then Shift-Click on the last one, and all in-between will be selected. You can then use “l” or “v” to apply labels to all of them at once.

Standard
How To

The fastest way to back up with Time Machine

I wrote about backing up your Mac and PC in January of 2008, and I said Time Machine was a great way to back up your Mac. A year later, I still think so, though I have some reservations.

There are three ways to back up your Mac with Time Machine. There used to be only two, but thanks to Drobo Apps, we now have three. I’ll list them in descending order, sorted by backup speed. Here they are:

To External Hard Drive (USB, Firewire, eSATA)

This one’s easy, and it’s the fastest way. You get a dedicated external hard drive, you connect it to your Mac, and you let Time Machine do its thing. You can leave it connected all the time, or you can disconnect the hard drive and only back up when you want to. Time Machine won’t complain unless you haven’t backed up for a few days.

This is the backup strategy I’ve come to use, and believe me, it’s the one that gives me the least amount of headaches. I have a 500GB LaCie Mini hard drive that connects over USB. I plug it into my laptop, and within minutes, my backup is done.

Keep in mind that I’m a photographer, and I also shoot short videos every once in a while, so it’s pretty much a given that I’m backing up gigabytes of data every time. When the backup’s done, I eject the drive and put it away. This way I’m not bothered by hourly backups, which I don’t need.

To External Hard Drive via Time Tamer

Time Tamer

Go download Time Tamer, a very handy little app created by the folks that make the Drobo, and you can create an image file on your Drobo that is limited to twice the size of your Mac’s hard drive. This is useful because there is no other way to control the size of the Time Machine backup sets. There’s is no way to set a quota via its System Preferences panel, and so it’ll keep balooning until it fills the backup drive. Obviously, when you have a Drobo or another larger drive, that’s a problem.

I for one don’t want to fill up my Drobo with Time Machine backups — I have other more important uses for it. I did, however, want to limit the amount of external drives that sat on my desk, and thought I could eliminate one of them by using Time Tamer with my Firewire Drobo. Did that for a few months, but I can tell you it’s not optimal, at least not for me. It boils down to the amount of data one has to back up, really.

As it turns out, the throughput when writing to the image file just isn’t fast enough when you work with several hundred megabytes or more. Even though writing to the Drobo is usually a fairly fast operation, somehow writing inside the image file isn’t. From my own experience, it would sometimes take a whole hour to do an hourly backup, which meant that as soon as one backup finished, another would start.

To make things more annoying, the throughput to the Drobo itself, and my Mac’s general peppiness, were also affected negatively during backups. Everything churned at a slower pace. Getting at my photos or other files stored on the Drobo was a pain. If I happened to be playing a movie and a backup started, playback would stutter or stop for a few seconds. It just wasn’t a feasible way for me to work, so I stopped doing this and returned to doing my backups directly to a dedicated external hard drive.

To wireless or networked hard drive (such as Time Capsule)

This will usually be the slowest way to back up your Mac via Time Machine. Think about it: you’re going to be pushing your bits via WiFi, and even though your hardware may be “n” specs instead of “b” or “g”, you’re still not going to get above 50 Mbps at best. Realistically, you’re looking at speeds somewhere between 15-45 Mbps, which is less than Fast Ethernet (100 Mbps) and nowhere near Gigabit Ethernet (1000 Mbps).

For comparison purposes, I have observed transfer speeds which approached USB 2.0 speeds when using a direct, wired, Gigabit Ethernet connection between two Macs (MacBook Pro and iMac G5). If you have a wired Gigabit network at home, this might be the only way to actually get decent backup speeds with Time Machine without needing to use USB or Firewire hard drives. But if you’re using WiFi, your transfer speeds are going to be anywhere between 15-20 times slower than Gigabit speeds, which means you’ll be sitting there a long time waiting for your backups to finish, should your backup set be anything over 100-200 MB.

When Time Capsule came out, I was tempted to buy it, just like I bought the Apple TV, only to regret that later. I’m glad I didn’t end up spending my money on Time Capsule, because it just isn’t suitable for me, or for anyone with larger backup sets. It certainly looks good, but that’s about all it does and all it’ll do until WiFi speeds approach Gigabit speeds.

Takeaway message

When one of my friends shared an article from Louis Gray via Google Reader, where he complains about how slow it is to back up to Time Capsule, was I surprised? Given all I’ve written above, do you see why I wasn’t?

Do the smart thing: if you’re using Time Machine, get a little portable drive like I did and run your backups that way. They’ll be fast, and you’ll be the one deciding when to back up, not Time Machine. I don’t know when Apple will decide to give us more configuration options for Time Machine, but until they do, those who care about their time should back up directly to an external drive.

Standard
How To

Run WordPress by itself or cached?

I’ve been running an experiment for the past three months. I wanted to see how well WordPress would do if I ran it by itself, without any sort of caching. So far, so good.

About four months ago, my web server kept getting pummelled into the ground almost daily, and I couldn’t figure out why it kept happening. After researching the issue, I found the prevailing opinion to side with the need for a caching plugin. People were complaining that it’s just not optimized well, and must be run with the aid of such a plugin, otherwise higher levels of traffic will bring the web server down. Trouble was, I already ran my WP install cached, using WP Super Cache, had been doing so for over a year, and my server still went down. (I should specify it had only recently started to go down.) What was I to do?

I posted a message in the WP forums asking why WordPress doesn’t generate static files. Were there any plans to do so in the future? To my surprise, Matt Mullenweg (WP’s founder) replied to my post, and told me that while there are caching plugins out there, WordPress.com doesn’t run any, and they’re doing just fine hosting millions of blogs. Others chimed in as well, and their replies got me to make the following changes:

  1. Made the switch to a VPS (Virtual Private Server) with SliceHost. Four months later, I’m still very happy about that move.
  2. Doubled the RAM on my web server (to 512MB from 256MB).
  3. Turned off WP Super Cache and started running my site by itself.

Each step followed the other in succession. I wanted to make gradual changes so I could see why my server kept having issues. Switching to a VPS host was good, and it was needed, but for my traffic levels, it wasn’t enough. Doubling the RAM was good and it was needed, and while the new RAM is enough for now, I’d still be having problems if I didn’t also disable my caching plugin.

Here’s where I think the crux of the caching/non-caching issue lies: it has to do with the load placed on the server as cached versions of the pages get created. Normally, that’s a non-issue. But as I monitored my server carefully, I discovered that it went down only as it started to get indexed heavily by search engines. Their bots visited my site in spurts, with traffic peaking, then falling back down. They spawned multiple threads, over ten at times, following links and slurping up the content. It’s when bot traffic peaked that an incredible load was placed on the web server. It kept generating cached versions of pages it hadn’t already cached, RAM and CPU demand increased to unsustainable levels, and it went down.

No amount of tweaking the Apache and MySQL config files helped with this sort of scenario, or at least it didn’t help me. You see, the difference between peak traffic levels with search engines vs. people is that people will go to a single article or a group of articles that are in demand. A caching plugin works great for those sorts of situations. There’s a limited number of pages to worry about caching, and those pages get served up time and time again. The load is acceptable. When a search engine bot starts indexing your site, it’ll call up any and all available pages that it can find. That can place a huge load on the web server as it scrambles to serve up those pages and build static versions for the caching plugin. I believe that it’s too much for most medium-sized servers to handle, and they will usually go down.

In my case, disabling the caching plugin and making sure no traces were left in the .htaccess file were the only things that helped. Now, I might have up to four different search engine bots crawling my site, each spawning multiple threads, and my server will usually not go down. Sure, there are times when the server will get dangerously low on RAM, and will be unresponsive for 5-10 minutes, but that’s an acceptable scenario for me. And if I should all of a sudden get huge amounts of people traffic to a post, it’s possible that the web server will also become unresponsive, at least for a time. But the great thing about running WordPress by itself is that Apache will usually take care of itself. As the requests die down, Apache will kill the extra threads, the available RAM will go back up again, and the server will recover nicely. That wasn’t possible while I ran the caching plugin. When it went down, it stayed down, and that was a problem.

I realize that what works for me may not work for others. I have not tested what happens with WP Super Cache on a larger server, for example one with more RAM. It’s possible that the larger amount of RAM there will offset the greater demand placed on the server as it builds static versions of the pages, although I’m not sure what to say about the CPU usage. That also peaked as the caching plugin went crazy. Not sure how that’ll work on a more powerful server.

WP Super Cache has some options that allow you to cache more pages and keep them cached for longer periods of time. Perhaps fiddling with those options would have allowed me to keep running the plugin, but I wanted to see how things stood from the other side of the fence. Like I said, so far, so good. Caveats aside, running WordPress by itself was the cure for my persistent web server outages.

Standard
How To

A cure for cold sores

I can’t take credit for this cure. A life-long nurse told me about it a few years ago, and it’s worked for us ever since. I’m not sure if she’d be comfortable having her name revealed here, so I won’t do it. But I’ll always be grateful to her for the advice.

In a few words, cold sores are cured and even prevented by Lysine. Any brand should do. Just go to your local supermarket or drug store and pick up some Lysine pills. They’re white, round, medium-sized as pills go, and they’ll do a number on your cold sore.

I, for example, have had these things since my childhood. Whenever I got stressed, or ate too much sugared stuff, or happened to be recovering from a cold or some other illness and my immune system was down, I got a cold sore. I used to be terribly embarrassed about them, and I still am, to some degree. Sometimes I’d get them four or five times a year, and each one took about 2-3 weeks to go away completely.

Now, whenever I feel that tingle in my skin and know that one’s on the way, I take a Lysine pill. You can take up to 3-4 pills a day, just don’t take them all at once. It’s not a sure-fire, 100% kind of thing, but I would say the overwhelming majority of the time, the cold sore doesn’t even show up on the skin. It just goes away. And when it does manage to break out, taking Lysine while you have it will make it go away sooner.

I don’t know why other cures don’t work, particularly the useless brand-name cremes that cost upwards of $20 for a tiny little tube (they only make things worse for me) — but inexpensive Lysine does the job just great. For less than $10, you get a huge pill bottle that will likely last you more years than you’ll remember.

Standard