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 can’t tell you how many times an acquaintance or friend has come to me with a broken hard drive asking “Can you get my data back?” as if their lives depended on it. The experience can be quite dramatic. I feel like a doctor telling family members that their loved-one has passed away. Losing all your data can be very stressful. Think about photos you can never get back, hours, weeks, months of work erased, just like that. You get the picture. Hard drives have moving parts, they spin at around 5000rpm. Soon or later, they will break, you can’t avoid it. Is your data backed-up? If you say yes, go do something else. Otherwise, keep on reading, you will thank me profusely some day.
It used to be that a couple CDs, or more recently, DVDs was enough to back-up all of one’s data. Today, with videos, movies, high resolution cameras, data fills-up hard drives like shoppers at Walmart on black Friday. Not to mention that if your drive bites the dust, you will have to reinstall your operating system. If you’re using Ubuntu like I am, not big deal, it’s free. If however you can’t find your Windows registration, guess what, $200 for Micro$oft. Hopefully you also have all your software somewhere safe, ready to be reinstalled.. Think about the amount of work though.. Who has the time to sit in front of a computer looking at a progress bar all day, or pay some geek a fortune to do it for them? I don’t.
These days, you are looking at two options. 1, a full drive backup on separate hard drives. 2, an online backup service. Let’s look at both solutions..
A full drive backup is great because you can make a mirror image of your drive, which can then be restored to a similar drive. You don’t have to reinstall anything, your entire drive is copied bit by bit independently of your operating system. It takes a few hours, but the recovery is painless and very easy. You will need two USB external hard drives of the same capacity as your main hard drive. Why two? Because your hard drive can fail during a backup operation, rendering your backup useless! So, you alternate the drives and backup every other week. At the most, you’ll lose one month of data updates. The downside of this scheme is that you can’t use your computer while it is backed-up. I do it at night, usually it is finished when I get up. You can also lose quite a bit of data if you are not diligent enough. You will need a drive cloning tool. Get G4L, it’s free and works great. You burn it onto a CD and use it to boot your computer. Be careful when you choose your source and target drive, you don’t want to backup an empty or old image to your current drive! An remember, it only works if you actually do it regularly!
The online backup solution is very convenient. You pay a small monthly fee, usually $10, to have your data automatically uploaded to a storage facility via the Internet. You can choose what folders to save, or exclude certain types of files by extension or size. What I like most about it is that it is transparent. You can still use your computer as usual while the program works in the background. I don’t notice any performance difference with the service I use. You need to make sure that the transmission of your data is encrypted, and that it also be encrypted wherever it is saved. Nobody should be able to read your files. The best service I have found is SpiderOak. They give you 2Gb for free, and charge only $10 per 100Gb. Their client program is great, and all data is encrypted. You can even synchronize your laptop with your desktop, or other computers. The process is pretty slow the first time you use it. I just uploaded about 84Gb in the span of a week. After your initial upload however, it is much faster. The good part was that I didn’t have to care about it at all. It works on Windows, Linux and Mac.
Which solution is best? Well, I highly suggest doing both! Make a mirror copy of your hard drive (you can use only one drive then), and have your data backed-up online with SpiderOak. This way, after a crash, you load the drive image with G4L, then update your data from your online backup. Everything is up-to-date, and you don’t have to reinstall anything.
Can you afford to spend $80 on an external hard drive, or/and pay $10 per month? Can you afford not to? Can you lose all your data? Remember, it’s not “if,” it’s “when.” Back-it-up!
So, you want to forge knives… Well, I just started myself, only made a few blades so far. I have learned some information useful to beginners that might not be readily available online, or scattered all over the place. These lessons learned might save you some time, aggravation, even a few dollars.. Follow any advise here at your own risk, I am no expert and forging is inherently dangerous.
About forging: Forging is not just that, hammering a red-hot piece of steel into a blade. You need to consider what else comes into building a knife. A lot of time will be spent grinding, sharpening, and polishing. If using sand paper gives you unpleasant goosebumps, or you cringe at the thought of getting burned or cut, you might want to look into knitting. Heat treating is not as simple as plunging your steel in water. Some knowledge of metallurgy about different steels and what happens to them at different temperatures is a must. Annealing, normalizing, hardening and tempering are important phases in creating a blade. Then you need to make a handle, sheath, and sometimes apply different finishes. Building a knife is a whole process, forging is only part of it.
Forge: I started by building a charcoal forge. It worked, but it is slow and dirty, a pain in the ass, really. Sure, It only cost me $60, and I could have built a better one. Gas however is fast and clean. I bought a $200 forge on Ebay and never looked back. The next one will have a round shape though, and be covered with refractory cement instead of KAOWool. A round forge body creates vortexes resulting in a more even temperature and probably gas saving. With a hard refractory coating, you will never breathe dangerous ceramic fibers.. Coal is another good option, also dirty, but better in my opinion than charcoal. See my gas forge here.
Steels: Many beginners will try to find some scrap steel at the junkyard. You might get lucky finding what you want, but you might not. Spending hours hammering steel to find out that it won’t harden is no fun. I just ordered six 3/16 x 1” x 60” bars of 1080 from Admiral Steel for about $90 (with shipping)! That is enough to make from 30 to 40 large knives. Less than $3 per knife. Mystery steel is like mystery meat, you really don’t know what’s in it and most of the time, it doesn’t turn out to be that good. 1075-1080 is probably the best steel to start with. It is a simple steel, easy to heat treat and forge. You can temper it in a kitchen oven at 450F. Tool steels and other higher carbon steels require better temperature control and higher tempering temperatures, around 550-600F. It isn’t worth my time fishing for scrap in a junkyard. I would probably often have to discard half-finished blades, so the savings are really not significant enough. Buy good steel, pick one kind, learn it well, you’ll get consistent results allowing you to refine your process. More on steel selection.
Heat Treatment Anneal every time you stop working for the day. Normalize three times before hardening. Use a magnet to determine when the steel has turned to austenite and is non-magnetic. Go slightly higher, and let the blade soak for ten minutes at that temperature. If you forge or heat-treat too hot, your steel will decarbonize. Quench in warm oil (140 to 160F). Cold oil will actually not cool your blade as fast. Avoid motor oil, it’s too thick. Thin oil, such as ATF or thin mineral oil is better. Don’t move the blade sideways while it cools, but front and back. If you want to create a hamon by differential clay hardening, cover the back of the blade with a refractory like Satanite (1/8” thick layer). Temper immediately after hardening, three times one hour at 450F. If you use a different steel than 1060-1075-1080, find out what the numbers are, don’t just guess..
Anvil: I bought a cast iron anvil at Harbor Freight. It is way too soft! Here is when a trip to the junkyard might save you money. A 100Lbs hardened steel anvil will cost you $400 to $600. Find any piece of steel with a flat surface, as heavy as you can carry. Secure it to a solid base, so that you can forge standing up. Thanks to my friend Phil and his father at Seaboard Steel, I was able get a heavy piece of steel which originally was a jaw that grabs giant steel plates. It must be heat-treated because it is very hard. We welded it to an I-beam and a half-inch steel base.
Hammer and tongs: Almost any hammer will do (you might want to put a nice smooth finish on it’s face), but you need tongs to grab your blades. I started with a pair of wise-grips, but they are too short and awkward to use. Having a piece of red-hot steel fly out when you hit it is pretty scary. Don’t ask me how I know.. (well, I still have one scar on my ankle..) Start by forging tongues. It is easier than forging a blade, and you will need them anyway.
Safety: Wear heavy leather gloves and clear eye protection (clear to see steel color). I have a welding jacket with leather sleeves that’s perfect for forging. Make sure nothing close to the forge can catch on fire. That includes your propane hose in particular! Wear a respirator when grinding or changing your ceramic fiber forge insulation. Don’t forget, you’re building knives, they can get really sharp! Blades can fly off your hands while grinding, specially when using buffing wheels. You must be conscious of safety all the time. You don’t want to end-up in the hospital or dead because of a hobby!
Information: It is easier to start with some help. Browse the following forums online:
I will add to this article once in a while as I discover new tips or pitfalls to avoid. Anyone with more experience than myself, that’s almost anybody able to forge a decent knife at this time, please add any advise for beginners you may have in the comments section below. Many thanks to the members of bladeforums.com for their feedback on this article!
I wanted a rust-proof finish on my khukuri. The cheapest and easiest solution I came up with is parkerizing.
Wikipedia: “Parkerizing (also called phosphating and phosphatizing) is a method of protecting a steel surface from corrosion and increasing its resistance to wear through the application of an electrochemical phosphate conversion coating.”
This process is used mainly on military type guns. The result is a dull gray finish which protects from rust and keeps oil on the steel. Abrasion will be an issue on a knife, but I already had the solution, and the amount of work required is minimal.
I ordered a manganese parkerizing kit from Shooters Solution, which can also be bought from Brownell. Our process will thus be mechanical only, since no electricity is used.
Step one is to clean the knife thoroughly with dishwasher liquid to remove any trace of oil. This is an important step, not to be skipped. The kit contains a special cleaning solution, which would be used after sandblasting, to clean and warm up the piece. I was out of this product, and used hot water instead.
Sand-blasting comes next, to remove any remaining oil and abrade the surface to make the manganese acid solution work better on the bare steel. The blasting cabinet we used had a very fine abrasive powder in it, which didn’t quite work, but a hand-held gun with coarse sand did the job quickly. At this time, it is very important that you do not touch the steel with your fingers! This would immediately start rusting and result in an uneven finish appearance. Flash rust will appear within ten to twenty minutes, so you must have your parkerizing solution and accessories ready nearby. I did see some on the blade, and it did create some differences in color. I didn’t care too much on a work knife, but the same result on a collectible gun would mean re-doing the whole process. Blast until you get a uniform light gray finish free of contaminants.
Be smarter than me and wear a mask and eye protection for sandblasting. My throat was itching after only a few minutes outside, blasting. That was a stupid idea!
The manganese solution comes concentrated in a bottle. You mix it with distilled water. A second cleaning after sandblasting is necessary, and it is a good idea to warm up the piece, so that the acid bath temperature doesn’t drop too low when you plunge it in. The ideal temperature is about 190F. If you don’t have a thermometer, you could wait for it to start boiling (212F) and immediately turn the heat off. Parkerizing only works on mild steel, and this is why you must use a stainless steel container. Otherwise, your solution would be wasted quickly, as any steel container would be also parkerized.
Make sure you do not touch the piece, and put it entirely in the solution. I wouldn’t do this because the knife was too long, and it resulted in a visible line near the handle, which again isn’t a big deal on a work knife. You will get much better results however if the part is entirely submerged. By the way, don’t breathe the fumes! Leave the part in for about ten minutes, moving it a bit once in a while. After removing it, clean it with hot water, and let it air dry. You can then apply the finishing oil. Et voilà! That’s all there is to it.
The charcoal forge was fun to build and use, but let’s face it, it takes forever to heat-up and it is pretty dirty. If I made another one, it would be more of a closed design to concentrate and conserve heat, and would have a good hand-cranked blower. So, I went on Ebay and shopped around to finally order a two-burner gas forge from CKForge for $199 plus $45 shipping. The design is basically a steel box opened on both ends and lined with insulation, with a firebrick on the bottom. A two-burner assembly is screwed on top. Connect a propane tank (I borrowed my housemate’s grill tank), and you’re ready to go. I wish the holes for the screws had been pre-drilled. Of course it is reasonable for the seller to assume that someone ordering a forge would own some kind of drill! My cheapo Chinese drill press from Harbor Freight did the job nicely. The forge is well built, with decent welds, no trouble at all, and it worked flawlessly right out of the box, but for the drilling.
Starting the forge was a walk in the park compared to my charcoal model. I grabbed the torch I use for Crème brûlée, lighted it, turned on the tank valve, then the regulator, barely, and finally the forge valve while sticking the flame inside the forge; it worked instantly. After what seemed a very short time, I had a red hot railroad spike on my anvil. A couple hours later I was finished shaping the blade! Not bad for a first timer, I thought, and so much faster than my charcoal home-made forge..
Forged Railroad Spike Knife
It looks a bit like a butter knife at this stage, but a little grinding will make the blade look a tad more “aggressive.” I traced a bevel line with a black marker, and a line where I will remove a bit of metal at the tip so that it isn’t so round. You can’t see it on the photo, but the edge is pretty close to it’s final shape, about 1/16th, 1/4” at the spine. The pommel looks a bit weird, but I didn’t know what else to do. A couple holes there for a lanyard will be nice. I flattened the ends so that it could be used like a hammer. At the end of my session, I brought the blade (now I can call it that!) to cherry-red hot and switched the gas off, leaving the knife to anneal (air-cool slowly to release stress) in the forge.
That small table you see under the forge on the video caught on fire after about an hour. So, if you get a similar gas forge, make sure nothing around it can ignite! Fortunately I had the garden hose handy.. And make sure the gas hose doesn’t touch the forge or dangle close to the openings. Now, that would be trouble!
June 24: Since I have to wait to get a decent grinder, I figured, what the hell, I’ll just make another one.. This time I am trying a double-edge knife with a twist in the handle. My friend Erin surprised me by setting up my anvil on a log, putting sheets of refractory material under the forge and installing a light above the whole setup. So, he’s drinking my beers right now and I am pretty happy with the installation. Here is a new video of me starting on the new blade:
And below, number two:
Second knife, double-edge with a twist
Next steps: Grinding, heat treatment, and sharpening. I might wrap the handle with fiberglass tape and epoxy, or opt for something more traditional. I am also thinking about parkerizing the handle and maybe part of the blade, but a nice polish would probably look better..
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.
I finally decided to go ahead and build a charcoal forge to make knives out of railroad spikes, motorcycle chains, suspension springs and other junk steel. I have never done this before, but as always, I researched the subject thoroughly before diving in. My goal is to produce crude knives at first,
I have been interested in martial arts since probably around age twelve. There wasn't many classes available in my home town of Comines (France), only traditional Judo and Karate. I tried a few Judo classes, but it wasn't what I had in mind when thinking about martial arts. Judo would actually have
I wrote this after riding my motorcycle in the rain..
What was I thinking, really? With a weather like that, driving to Ruskin.. Good thing it started raining on the way back, and not before. But the fact that I was going home made it all right. Actually, it was kind of fun. Raining like cats and