I have my aviation site Planenews on a FreeBSD server. As traffic increased, I was getting more database errors. Looking around the web for clues, I discovered that FreeBSD did not have a default my.cnf file in /usr/local/etc. You can find sample files in /usr/local/share/mysql. I used my-huge.cnf, renamed it to my.cnf, put it in /usr/local/etc, et voila (don’t forget to restart MySQL)!
Problem solved? Nope.. I was still getting errors at peak traffic. I then found mysqltuner, a Perl diagnosis tool for MySQL. I was missing a few variables in my.cnf. See the file below, and notice the additions under “Added by Gil.”
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 128M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
# Added b Gil:
# max_connections 250 crashes my server, use with caution..
#max_connections = 250
wait_timeout = 180
interactive_timeout = 45
tmp_table_size = 64M
max_heap_table_size = 32M
# Disable Federated by default
skip-federated
skip-innodb
skip-bdb
# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
The site seems to be running fine now, with no errors. I guess I will have to wait for a story to make it to a major social networking site to see if it really can take a heavy load. Please tell me about your optimization tips, and how you prepared for traffic spikes…
I have always wanted to build an airplane. I did build three ultralights from kits, flew them, and I am still here, so I must have been doing something right. A small airplane should not be much different, just take more time. Right now I am stuck restoring my boat, so it will have to wait a year or two, but I can’t still dream an plan ahead, right?
I used to want a fast plane, one of those formula one racers with stubby wings and a big engine flying at 200Kts+. But flying, if it is about the thrill, is also about sharing the fun with others. For that, you need a two-seater. I used to own a VW-powered biplane of a very original design:
I used this one to tow banners along the French coast and take people for ride$. It was hard and dangerous work, but a lot of fun. There is something magical about landing on a grass field or a beach, I can’t explain it. I wish I still owned it, I would have packed it in a container and shipped it over here. So, now, being a bit more responsible, I am contemplating a small two-seater, capable of landing anywhere, easy to build and safe to fly. I found one, the Zenith CH701.
You can build one of those for around $20K, which over a few years is perfectly feasible. My work leaves me enough free time. That’s really all I want to build in my life, a boat and a plane! That plane doesn’t cost more than a decent car, if you don’t count your work, which is substantial.
So, I will keep dreaming for now. After all, that’s what keeps us going. If I didn’t have those two projects, I would be rather depressed. I need to work with my hands, that computer business of mine doesn’t fill that need. But, oh, wait, they have a starter kit to build the tail for $375! And my friend Erin has that broken Volkswagen bug in the car port… Hum…
“The Best of All Worlds” is where we live today. Unfortunately humanity has bipolar disorder. Find an asteroid on a collision course with earth, and all the industrial nations of the world would chip-in to build a spacecraft and go blow it up. After that, we’d just go back to killing each-other. History is full of lows we would rather forget. I was inspired today by my friend Victoria’s blog entry on the Holocaust. We must remember such events, and most importantly how they started. But knowing the signs doesn’t help much. Knowing that you can drown doesn’t teach you how to swim.
When I was twelve-years-old, my grandfather hung a couple old pots on a tree branch, handed me his sixteen-gauge shotgun and said “go ahead, aim carefully.” He used to tell me stories about the war, when I bugged him enough to get him to talk. That’s probably when I first realized that it wasn’t always the best of all worlds. He never warned me about watching for signs of impending doom, he just taught me skills that had helped him survive the darkest years of the century. I did not think much of it at the time, it was all fun and games for a boy my age. I did however feel compelled to keep studying and spent a decade handling and shooting small arms, hundreds of rounds a week, with rifle, sub-machine-gun and pistols. I practiced martial arts for years. I went camping, traveling, learned basic survival skills and street-smartness. I could as well have picked-up golf or tennis. Something in me told me I had to learn those things. That compulsion is part of me. It is not a fad, not an ego trip, not a hobby. I do not wonder why.
We humans have a tool no other animal possesses, self deception. It is a curse. If you ever wonder how some people can be very intelligent but have no common-sense, there you go, self-deception. No animal in the wild is going to think “what what that noise? Oh, probably nothing..” We do it all the time: “The government would never do that,” “that guy would never hurt me,” “that could never happen here.” Why think about unpleasantness..
I spend enough time in coffee shops to hear it all, mostly rants about politics and how civilization as we know it is about to end. There is a lot of talking going on. Not much else. I am not a proponent of revolution mind you, the best answer to political problems is informed vote. Emphasis on “informed.” What I am a proponent of is preparedness. Things occasionally do go to hell in a hand-basket, on a macro, or micro scale, doesn’t matter, you can end-up just as dead. Being killed by a horde of thugs after an economic breakdown or a mugger at the ATM machine makes no difference. I will tell you exactly what most people do when something like that happens: Nothing. It’s too late for learning how to swim after you fall off the boat. Even worse: It’s too late to learn how to swim after your family falls off the boat. Take a few minutes to think that one over…
If you’re a loner and plan on crawling into a fetal position and keel-over when the going gets though, be my guest. It’s your choice. But of course, it won’t happen to you, right? I am addressing most of us here however, husbands, wives, boyfriends, girlfriends, friends, and most importantly, parents. It is parent’s responsibility to learn how to defend their children, and teach them to defend themselves. And here is what baffles me the most, almost nobody does. Parents tell their kids not to talk with strangers, but they have no idea about what to do if the stranger has a big knife and is not interested in talking to them at all. Any decent parent would fly to the rescue, but unfortunately, whatever they do next would probably not be the best action, as far as outcome is concerned. Sorry about giving you a guilt trip here, but if I don’t, who else will? You’re not a bad parent, you just deceived yourself. Now you have no excuse, you have been informed. Yet, I will tell you exactly what most of you will do: Nothing.
I am also advocating building strong communities. Look at Switzerland. Every house in Switzerland has an assault rifle provided by the government. Kids in Siberia learn to shoot Kalashnikovs around ten-years-old. Young men and women in Israel serve in the IDF for three or two years respectively. Anybody thinking about invading Switzerland, Siberia or Israel is going to think twice about it.. Anyone attempting to invade Western Europe would have no problem at all. It has been done more than once before. The United States would be a different story, with the number of guns in circulation. The question is, do you have one? Do you know how to use it safely and efficiently? Oh, you are anti-gun.. That’s like being anti-life-vest on a boat. But we are in the same boat. You don’t live in a separate world where everybody is nice and respectful. You live in the same world as the people who were killed by home invaders or raped and killed by sexual predators. Sure, it might not happen to you. What if it does? What if the mighty Dollar takes a plunge and the gangs from that other part of town want your food after they ramsack the supermarket that just closed down? Anyway, enough scare tactics. I don’t spend all my time thinking about such scenarios, actually, I almost never do but for times like today. You know all this anyway. Yet, I will tell you exactly what most of you will do to be more prepared: Nothing.
Now, if you are still reading and haven’t crossed me off your list of friends for being a psycho survivalist type (I’m not, far from it) who makes you feel guilty about spending too much time watching television and getting fat on junk food, you might be onto something. I am not telling you to go to the Gym every day or run 10K twice a week. I get pretty lazy myself at times. There is however a minimal physical condition you should aspire to reach. Now is the time to make new-year resolutions. Read my blog on combat conditioning. If you want to exercise and learn useful skills at the same time, don’t go hit balls with a racket, learn a martial art. Go camping with your kids, learn and teach them what it takes to survive outside your cozy house, how to catch a rabbit, a fish, gut it, cook it. Learn about firearms, safety first.. If not to defend yourself in your house, you might need one someday to shoot your food! You’re vegetarian? Doesn’t matter. When you’ll be hungry enough, your brain will make you seek proteins, and you will eat meat, I promise you. There are whole books about self-sufficiency, I am not going to tell you what to do. If you need advise on firearms or martial arts, you can ask me. I am no expert, but I’ve been around, and if I can’t answer, I know people who can, or where to look. Just ask yourself “Can I take care of myself without society? Defend myself without the cops?” The police can’t be at your door in one minute, can they? But sometimes, that’s all the time you’ll have. Be glad you are now wondering about your personal well-being and you family’s, because I’ll tell you exactly what most people will do to be more prepared: Nothing.
I think I’ve been messing-up with my guitar long enough, it is time I get serious about it. So, I plugged my Peavey Wolfgang into my Korg PX4, split the output between headphones and my computer running Audacity on Ubuntu. You don’t have to follow all this, but simply said, now I can record music.
Peavey Wolfgang (US made)
Now, as you may have heard, guitar practice is like farting, it stinks to everyone but yourself. So, sorry in advance about submitting you to this.. This is my first riff, though I came up with it a while ago. You’ve been warned:
After weeks of consideration and research on the web, I finally decided to buy a katana. Not a cheap wall-hanger, but a practical sword, forged by hand and differentially hardened. I am very familiar with knives, even started to forge my own. Swords however are mostly unknown to me. Why would a grow
Here is an excellent self-defense weapon, the Cossack whip, or nagaika. I received mine directly from Siberia (thank you Andrei!). It is a short braided leather whip with a hard handle and a tip which sometimes contains metal (mine doesn't) like a small lead bullet. Overall length is thirty seven in
I have been pretty busy forging, with the completion of a scimitar inspired knife out of a railroad spike, hardened in water, and a sort of tanto for my friend Phil who provided me with steel for a new anvil and helped me build it. The tanto was differentially hardened using the clay method with Sat