Archive for November 4th, 2007

November 4, 2007: 8:30 pm: adminMiscellaneous

Copyright 2006 Zai Zhu

Shopping for watches on the Internet, while enjoyable can be difficult for a number of reasons. Two main reasons are that there are an overwhelming number of watches available and you don’t get to see them and feel them before you click that buy button. However, with some basic knowledge on wrist watches, you will be able to browse through more choices in less time and significantly increase your chance of finding the watch that you want.

Watches 101

Before you shop for your next watch, be it a Citizen watch or an Invicta watch or any watch for that matter, it is a good idea to know how watches are classified. Watches are generally classified as either quartz watches or mechanical watches. Mechanical watches are further broken down to automatic watches (automatic winding) and manual wind watches. Mechanical watches consist of all mechanical components and hence the name mechanical watches. Mechanical watches do not need battery. Quartz watches do need battery. Quartz watches gets their name from the quartz crystal that is in use in the movement.

There are inherent advantages and disadvantages with both quartz and mechanical watches. Quartz watches are more accurate and less expensive than similar mechanical watches. However, you do have to change the battery every few years, which will incur additional cost and inconvenience. Mechanical watches are less accurate. They are heavier and usually cost more than similar quartz watches. However, mechanical watches are view as more than just timepieces; they are pieces of art. They are canvases where watchmakers showcase their creativity and skills. Even a simple mechanical watch can have over 100 parts in them compare to just a few dozen in quartz watches. It is not difficult to see that it takes far more expertise to put a mechanical watch together. Knowing whether you want a quartz watch or a mechanical watch will help you filter out a significant number of choices.

Watches are further classified into smaller categories based on their functions or complications. Examples of popular complications are chronograph, perpetual calendar, and moon phase.

What is popular now?

Currently, chronograph watches, diamond watches, dive watches, and watches with large face are some of most popular watches available on the market. Chronograph watches are watches with a stop watch feature built in. Most people buy chronograph watches for the look, few actually use the function. Diamonds can really add some sparkles to watches. Diamond is one of the most popular precious stones, so it is no surprise that diamond watches are popular. Dive watches are popular because they are often rugged looking and convey a sense of durability, not to mention the fact that they have high water resistance. Large face watches are popular partly because many celebrities are wearing them and also because it is easier to tell time with them.

What to look for?

Once you determine whether you want a quartz watch or a mechanical watch and the kind of complications you want it to have, it is time to look at some materials.

Case materials:

Popular watch materials for watch cases are stainless steel and titanium. Stainless steel and titanium are good because and they are durable. Titanium is lighter than stainless steel, but much stronger. However, it has a duller look compares to stainless steel. Titanium tends to be a little more expensive than stainless steel.

Crystal materials:

Sapphire crystals and mineral crystals are recommended for most watches. Sapphire crystal is much harder than mineral crystal and is a lot more scratch resistant than mineral crystal. They are obviously more expensive than mineral crystals. Materials to avoid are glass and acrylic. They are found in many low end watches.

Watch band materials:

There are a wide variety of watch band materials ranging from stainless steel to eel skin. Which material works best for your watch is determined by your taste and your intended use for that watch. If you are active and will be getting the watch wet often, then you will want to go with either a metal bracelet of some sort or a rubber strap as they are easy to clean and maintain. It is not recommended for any type of leather strap to be submerged in water as it can deteriorate the quality of the band.

Tips to getting the right watch the first time!

Read the descriptions including all the specifications of all the watches you are interested in carefully. As a watch dealer, very often I see customers returning a watch simply because it was too big or too small. If only they had read the descriptions and the specs carefully, they won’t have to waste money on shipping and create extra work and inconvenience for themselves and others. If you are unsure whether a watch will be too big or too small for you, measure your wrist and know its approximate size. Remember you can always call the vendor and ask for additional help. It sure beats making an unnecessary trip to the post office.

Learn these basics about watches and you will soon discover that you can spend less time and browse through more watches, so you may find the one that best fits your taste and your style of life.

Zai Zhu is a watch collector and a watch dealer. Visit www.discountwatchstore.com to learn more about wristwatches. You can also shop over 800 fine watches including 100’s of Citizen watches and Invicta watches as well as other brand name watches such as Luminox, Mido, Orient, Croton, Vanceur, and Wenger.

: 7:35 pm: adminThe Technology Way

A telephone is a device that translates one’s speech into analog electrical signals, allowing them to engage in communication over extended distances. The word telephone is Greek for “far away voice”. Originally, all telephone transmissions took place over land based phone lines, but in recent times more and more people have been using cellular phones, satellite phones, and other wireless technology.
About the Author

Jeremy Maddock is the owner of a quickly growing telecommunications industry news website.

: 6:58 pm: adminThe Technology Way

Our oceans are home to many marine mammals, fish, turtles, corals and others. The delicate balance between man and the ocean is constantly being challenged by the demands of our society.  Most of our planet is covered by water, a necessary ingredient of human life.  The state of our oceans should be uppermost in our minds in order for quality of life for all species to remain as it is.


Manatees - an endangered species The common name for Florida’s gentle giants is the West Indian manatee. They are found throughout rivers, springs and shallow coastal waters of Florida and adjacent states.  Weighing up to 3500 pounds and having a bulbous face and rotund shape, scientists believe they are the ‘mermaids’ identified by sailors in historical lore.  Manatees consume 5-10 percent of their body weight daily and spend 6-8 hours a day feeding.  They are plant-eaters and are commonly found grazing along the same areas as recreational boaters.  This fact accounts for numerous killings and maiming of manatees in Florida each year.  Propeller scars are so common on manatees that there is a computerized catalog of photographs to enable identification of individuals by their scars.


According to the February 2004 count of manatees in Florida by the Florida Fish & Wildlife Conservation Commission there are only 2568 remaining in Florida.  Even with this low number,  there are efforts by some to remove manatees from the endangered species list.


Dolphins - our favorite ocean mammal Humans love dolphins because of their smiling face.  Dolphins aren’t really smiling, this is just the shape of their mouths.  Dolphins are mammals.  They have hair, breathe air and give birth to live young.  The hair is visible at birth, a few whiskers here and there.  Dolphins can weigh up to 800 pounds and have lived up to 50 years–the period we have been tracking them. Dolphins eat fish and swallow them whole.  Dolphins give birth to one baby at a time and the baby usually stays with the mother the first three years, growing rapidly on mother’s milk.  Dolphins are not endangered at this time, but the Marine Mammal Protection Act of 1972 requires us to steer clear of  them.  So enjoy them from afar!


Sea Turtles-Florida’s efforts for recovery All species of sea turtles are endangered or threatened and many of them lay their eggs along the coast of South Florida.  Loggerheads, Leatherbacks, Green sea turtles have all been nesting here.  South Florida is also one of the nation’s best tourist destinations.  The beaches are populated with high rise condominiums and hotels.  Some cities have passed ‘no lights’ laws to help these hatchlings find their way to the ocean instead of the highways to be killed as the babies follow the brightest light.  Turning the lights down or off late at night helps protect these babies.   The rare Kemp’s Ridley has also been spotted in Florida.  Many of our local nature centers lead guided tours to watch the huge turtles come to shore every year or so to lay their eggs.  Each turtle might lay up to 100 eggs.  Within 43-75 days the hatchlings are ready to find the ocean, and fight for survival.  They will return to the same beaches 25 or more years later to lay their eggs.  Stay tuned for the news of this years’ counts of nests in South Florida.


WHAT IS THE LEADING CAUSE OF WATER POLLUTION? Most pollution comes from general locations of pollution discharge rather than one specific location.  Florida’s pollution is stormwater runoff.  This is rainwater flowing off the land’s surface which carries litter, oil and chemicals into the closest waterway either directly or through storm drains. 


A pamphlet made through the Youth Environmental Programs, Inc states:  “Water pollution prevention does not begin when you are in or near the water.  It is a practice which needs to be implemented in all areas of your life.”


WHAT CAN YOU DO TO HELP THE ENVIRONMENT?
1. Use a canvas bag for shopping instead of paper or plastic and reusable plates and cups instead of disposable ones.
2. Support recycling efforts in your community.
3. Clean with non-toxic products such as lemons, vinegar and baking soda instead of harmful cleaning solutions.
4. Save water by turning off the shower when soaping up and the faucet when brushing your teeth.


Adopt a dolphin!
Dolphin Research Center
58901 Overseas Highway
Grassy Key, FL 33050
305-289-1121


Adopt a manatee!
Save the Manatee Club
500 N. Maitland Avenue
Maitland, FL 32751
1-800-432-5646 or 407-539-0990


Additional source used for this newsletter:
Florida Department of Environmental
Protection, Florida Marine Research Institute,
100 Eighth Avenue SE, St. Petersburg, Florida
33701-5095.

Kathy Runk is owner of www.myoceantreasures.com marine jewelry and gifts  and is actively involved in marine conservation including volunteering for non-profit agencies concerned with our oceans and their inhabitants.

: 9:52 am: adminArts & Crafts

People who enjoy stitching have for a long time known the
benefits needlework brings. There are many reasons why
people choose use their leisure time to stitch, but there are
also many reasons why this is good for them!

Engaging in a craft such as needlework causes the
embroiderer to slow down, and concentrate on the task at
hand. With such busy lives, many of us find that such
opportunities are precious. They help us to relax, give our
hands the chance to work, while our minds can be at rest.
Sure, needlework requires concentration, but some
needlework falls into a rhythm, which allows our brains to
disengage while our hands’ muscle memory does the work.

In his book “In Praise of Slow”, Carl Honore explains why
slowing down is important, and how in our culture of speed
we need to take opportunities to slow down. Needlework is
a great way to do this. It takes time. It is not something that
can be mastered overnight, nor are most projects
something that can be done overnight. Needlework
develops fine motor skill, but also more intangible skills
such as delayed gratification and persistence.

Needlework allows for expression of creativity. We can use
our embroidery to express ourselves. I do embroidery
because I must be creating something. For me, it is
something I am driven to do. If I do not create, I feel that
something is missing. For me, and many others, the action
of creating something contributes to our mental well being
and feelings of fulfilment.

I feel that there is something spiritual about creating. Made
in the image of God, we share some of His likenesses. God
created everything. When I create, for me it is an act of
worship. Its me saying “God, you are the ultimate creator.
Here is my feeble attempt as an offering to you.”

I often find that many of the students in my needlework
classes have health problems. Needlework classes are an
opportunity for students to completely lose themselves in a
task, forgetting their problems, while enjoying the wonderful
social interactions that embroidery classes typically provide.
One of my students once commented that getting together
with a group of women to sew is better than paying $50 to a
therapist any day! And at the end they have something that
they have made to show off or even give to their family and
friends. The benefits of building social connections and self
esteem like this are enormous.

It seems that many people agree. Attendance at the craft
shows around the nation is up, with many spending up big
on a range of crafts in which to immerse themselves. New
craft magazines are appearing on the newsagency shelves
all the time. The message that “craft is good for you” is
getting through.

It is clear that needlework fills a void in people’s lives: for
social interaction, for expression of creativity, and for giving
people something meaningful and enjoyable to do.

We can now enjoy the knowledge that research backs up
these experiences: participation in the textile arts brings
many benefits, particularly for health and social wellbeing.
Frances Reynolds, Senior Lecturer in Psychology at the
Department of Health and Social Care, Brunel University,
UK has published a paper entitled Textile art promoting
well-being in long-term illness: some general and specific
influences
.

“It fills occupational voids following early retirement and
enables social contacts. Textile artwork also stimulates
learning and personal development. It draws upon rich
social traditions, facilitating social contact. Many forms of
textile art making are highly time-consuming, fostering
a future orientation, and the creative process is often
socially visible within the home, with positive consequences
for self-image.” says Dr Reynolds.

So as you enjoy your embroidery, rest easy in the
knowledge that what you are doing is good for your health.
And you could even use it as an excuse to buy more craft
supplies and add to your stash… “But its good for my
health!”

Yvette Stanton is an embroidery teacher and the author of
the books “Mountmellick Embroidery: Inspired by Nature”
(2004) and “Elegant Hardanger Embroidery” (2002, 2005).
http://www.embroidery.more.at

: 8:13 am: adminArts & Crafts

The English began manufacturing soap during the 1100s, Italy, Spain and France, also began making soap at an early stage, possibly pre-dating England by up to 400 years. Early soap production primarily used tallow from goats and beech ash, but following experimentation by the French, olive oil was found to be an effective alternative to animal fats.

In about 1500 this discovery was introduced to England and the industry began to grow rapidly King James I granted special privileges including a monopoly to a soap maker for $100,000 a year, it was clearly a product for the wealthy.

In the American colonies, commercial soap making began in the early 17th century as settler tradesmen arrived from England, but in spite of this, soap making remained almost exclusively a home made product for many years. It is understood however that commercial soap makers visited houses and traded waste fats in exchange for soap.

In 1783 Swedish chemist Carl Wilhelm Scheele accidentally simulated the reaction that occurs in the present-day boiling process of soap making, when he boiled olive oil with lead oxide. This produced a sweet-tasting substance that he called Ölsüss – now known as glycerine.

Until late in the 18th century wood or bark ash was generally used as the catalyst in soap making. In 1791 soap making was revolutionized with the discovery by the French chemist Nicholas Leblanc of a process for making soda ash from common salt. This discovery significantly reduced the cost of the ash ingredient, while also improving quality.

Some 20 years later Michel Eugene Chevreul established the basis for both fat and soap chemistry and thus the science of modern soap making was born. His studies revealed the chemical nature and relationship of fats, glycerine and fatty acids.

The invention during the mid-1800s of the ammonia process by Belgian chemist Ernest Solvay further reduced the cost of obtaining the alkali soda ash from common salt and again the quality and quantity available for the industry increased significantly.

Together with the developing availability of power to operate factories, these advances made the manufacture of soap one of America’s fastest growing industries by 1850. This increased availability also changed soap from a luxury to an everyday convenience; however taxation in some countries also played a part in preventing its widespread availability and therefore inhibiting improvements in cleanliness standards.

Gary Everson is the Soap Business Guru. In his new e-book: “Soap Making for Profit” he describes in clear, step by step terms how to turn an enjoyable and creative hobby into a profitable business.

Copyright © 2006 Gary Everson

: 3:56 am: adminHardware Stuff

The idea of a laptop, or portable, computer was first conceived by Alan Kay, who worked for Xerox, at its Research Center in Palo Alto CA. He called it a Dynabook. He wasn’t the first to offer a completed laptop computer for public consumption, however. That honor went to Grid System’s William Moggridge in 1979. His brand new concept was housed in a magnesium case that was die cast. Its bubble memory was a total of 340 kilobytes. The laptop also had a luminescent folding graphics display screen.

A vastly improved laptop computer was the 1983 brainchild of Gavilan computer. Their latest version offered DOS as well as their very own Gavilan operating system, 64 kilobytes of RAM, was expandable to twice that, an 8088 microprocessor, a touchpad mouse and even a printer. The laptop and printer together weighed a hefty 15 pounds, although the laptop was a reasonable 9 pound weight.

In 1984 Apple got into the laptop act, premiering its Apple llc. Although notebook size, it was still at the high end of the comfort scale, weighing in at 12 pounds. And, as always at the start of an electronic revolution it wasn’t cheap - retailing for $3500. The Apple llc had an 8088 microprocessor, 256 kilobytes of memory (certainly tiny by today’s standard but a massive step up at that time), two floppy drives ( 3 1/2″, not 5 1/4′), space for the installation of an internal modem (not part of the original packaging), and both parallel and serial ports. It even included its own applications for telephone and address book, word processing, appointments, and calculations. It earned rave reviews and the age of the laptop was born.

Soon after IBM and its shadow, Toshiba jumped on board the laptop bandwagon.

Today’s laptops of course are far more advanced, less expensive, and smaller than these early versions. But when you’re looking for your own laptop many of the features offered by these pioneers are still the ones you’re going to want to research for your laptop purchase today. Here’s what you’ll need to compare before you make your laptop purchase:

Microprocessor - This is the brain of your laptop, the part that tells the other parts to get going and do their job. The best microprocessors now available are Pentium, the latest a Pentium IV. A step down from Pentium are the Celeron and AMD versions. Which product you choose determines the speed of your laptop. Pentium is the best and therefore the fastest. Much depends on the use you’ll be making of your laptop.

Operating System - this group of instructions, preprogrammed, dictates functions to the microprocessor. Power and security variances are determined by your choice of operating system.

RAM and VRAM - Random access memory (V is for video), should be a minimum of 126 MB to accommodate today’s software programs.

Disk drives - The newest laptop versions will have DVD or CD drives and no floppy drive. They hold more, weigh less and last longer. Remember, however, that you may have backed up your old PC with oodles of disks. If that’s the case, rather than back up all over again you may want to purchase an external floppy drive for your laptop.

Modem - While some laptops offer external modems, the easiest to use is one with want an internal 56k modem.

Alan Jason Smith is the owner of http://www.tkcicomputers.com which is a great place to find computer links, resources and articles. For more information go to: http://www.tkcicomputers.com.

© Copyright 2005

: 2:26 am: adminMiscellaneous

So just what is 4 color printing? 4color printing is a process wherein it make used of 4 screens and 4 inks in order to reproduce the color of the original image. 4color printing is also referred to as process printing and it is considered to be the best in full color printing.

4color printing has somewhat revolutionized the printing industry since it has made color jobs easy and affordable. Aside from that, the images printed by means of 4color printing really stands out while its stunning colors provide the copy with the touch it needs to equal the quality of the original image. 4color printing can make any stale document come to life at a cost that won’t break the bank. Likewise, 4 color printing is best when used in business cards since it can really impressed clients. The colors are simply awesome, guarantees that your business cards won’t be put in trash. 4color printing assures you that your business cards will reflect an exemplifying image of you and your business. Clients are sure to call you since you have successfully grabbed their attention. Another advantage is that you won’t need to provide them with souvenirs since your business card is enough to function as your souvenir. And of course with client calling you the possibility of closing a deal is not farfetched. With sales comes business growth. By using 4color printing your business is assured of a market share.

4color printing is also great in creating impressive promotional media. The superior quality of 4color printing is unequaled and the price is just affordable. 4color printing has opened up a venue wherein colors can be enjoyed by all. Creating your business documents by using the 4color printing is a good business endeavor. 4color printing can also help in the promotional campaigns of businesses. The full color output is enough to make customers interested in investing in your company.

There are many 4color printing providers that can be found both online and offline. But thanks to the internet finding a 4color printing provider has become much easier as well as convenient. The online providers of 4color printing also offer online printing quotes to provide you with the list of their prices. They also have friendly customer service operators that are available 24 hours a day and 7 days a week to answer all your queries and also to help you in whatever printing problems you have. They also offer shipping options so that your printing project will be directly mailed to you. These are services deluxe that can only be found online.

For suggestions and comments kindly visit 4 Color Digital Printing and Color Poster Printing Services
.

About the Author

Jinky C. Mesias is a graduate of Bachelor of Arts and Sciences in Business Administration Major in Business Management. She is at present an Associate Manager of a Life Insurance Corporation and a freelance writer.

: 2:23 am: adminLiving With Software

Introduction

Surprised, by the title? well, this is a tour of how we cracked the scalability jinx from handling a meagre 40 records per second to 500 records per second. Beware, most of the problems we faced were straight forward, so experienced people might find this superfluous.
Contents

* 1.0 Where were we?

1.1 Memory hits the sky
1.2 Low processing rate
1.3 Data loss :-(
1.4 Mysql pulls us down
1.5 Slow Web Client

* 2.0 Road to Nirvana

2.1 Controlling memory!
2.2 Streamlining processing rate
2.3 What data loss uh-uh?
2.4 Tuning SQL Queries
2.5 Tuning database schema
2.5 Mysql helps us forge ahead!
2.6 Faster…faster Web Client

* 3.0 Bottom line

Where were we?

Initially we had a system which could scale only upto 40 records /sec. I could even recollect the discussion, about “what should be the ideal rate of records? “. Finally we decided that 40/sec was the ideal rate for a single firewall. So when we have to go out, we atleast needed to support 3 firewalls. Hence we decided that 120/sec would be the ideal rate. Based on the data from our competitor(s) we came to the conclusion that, they could support around 240/sec. We thought it was ok! as it was our first release. Because all the competitors talked about the number of firewalls he supported but not on the rate.

Memory hits the sky

Our memory was always hitting the sky even at 512MB! (OutOfMemory exception) We blamed cewolf(s) inmemory caching of the generated images.But we could not escape for long! No matter whether we connected the client or not we used to hit the sky in a couple of days max 3-4 days flat! Interestingly,this was reproducible when we sent data at very high rates(then), of around 50/sec. You guessed it right, an unlimited buffer which grows until it hits the roof.

Low processing rate

We were processing records at the rate of 40/sec. We were using bulk update of dataobject(s). But it did not give the expected speed! Because of this we started to hoard data in memory resulting in hoarding memory!

Data Loss :-(

At very high speeds we used to miss many a packet(s). We seemed to have little data loss, but that resulted in a memory hog. On some tweaking to limit the buffer size we started having a steady data loss of about 20% at very high rates.

Mysql pulls us down

We were facing a tough time when we imported a log file of about 140MB. Mysql started to hog,the machine started crawling and sometimes it even stopped responding.Above all, we started getting deadlock(s) and transaction timeout(s). Which eventually reduced the responsiveness of the system.

Slow Web Client

Here again we blamed the number of graphs we showed in a page as the bottleneck, ignoring the fact that there were many other factors that were pulling the system down. The pages used to take 30 seconds to load for a page with 6-8 graphs and tables after 4 days at Internet Data Center.

Road To Nirvana

Controlling Memory!

We tried to put a limit on the buffer size of 10,000, but it did not last for long. The major flaw in the design was that we assumed that the buffer of around 10000 would suffice, i.e we would be process records before the buffer of 10,1000 reaches. Inline with the principle “Something can go wrong it will go wrong!” it went wrong. We started loosing data. Subsesquently we decided to go with a flat file based caching, wherein the data was dumped into the flat file and would be loaded into the database using “load data infile”. This was many times faster than an bulk insert via database driver. you might also want to checkout some possible optimizations with load data infile. This fixed our problem of increasing buffer size of the raw records.

The second problem we faced was the increase of cewolf(s) in memory caching mechanism. By default it used “TransientSessionStorage” which caches the image objects in memory, there seemed to be some problem in cleaning up the objects, even after the rerferences were lost! So we wrote a small “FileStorage” implementation which store the image objects in the local file. And would be served as and when the request comes in. Moreover, we also implmentated a cleanup mechanism to cleanup stale images( images older than 10mins).

Another interesting aspect we found here was that the Garbage collector had lowest priority so the objects created for each records , were hardly cleaned up. Here is a little math to explain the magnitude of the problem. Whenever we receive a log record we created ~20 objects(hashmap,tokenized strings etc) so at the rate of 500/sec for 1 second, the number of objects was 10,000(20*500*1). Due to the heavy processing Garbage collector never had a chance to cleanup the objects. So all we had to do was a minor tweak, we just assigned “null” to the object references. Voila! the garbage collector was never tortured I guess ;-)

Streamlining processing rate

The processing rate was at a meagre 40/sec that means that we could hardly withstand even a small outburst of log records! The memory control gave us some solace,but the actual problem was with the application of the alert filters over the records. We had around 20 properties for each record, we used to search for all the properties. We changed the implementation to match for those properties we had criteria for! Moreover, we also had a memory leak in the alert filter processing. We maintained a queue which grew forever. So we had to maintain a flat file object dumping to avoid re-parsing of records to form objects! Moreover, we used to do the act of searching for a match for each of the property even when we had no alert criteria configured.

What data loss uh-uh?

Once we fixed the memory issues in receiving data i.e dumping into flat file, we never lost data! In addition to that we had to remove a couple of unwanted indexes in the raw table to avoid the overhead while dumping data. We hadd indexes for columns which could have a maximum of 3 possible values. Which actually made the insert slower and was not useful.

Tuning SQL Queries

Your queries are your keys to performance. Once you start nailing the issues, you will see that you might even have to de-normalize the tables. We did it! Here is some of the key learnings:

* Use “Analyze table” to identify how the mysql query works. This will give you insight about why the query is slow, i.e whether it is using the correct indexes, whether it is using a table level scan etc.

* Never delete rows when you deal with huge data in the order of 50,000 records in a single table. Always try to do a “drop table” as much as possible. If it is not possible, redesign your schema, that is your only way out!

* Avoid unwanted join(s), don’t be afraid to de-normalize (i.e duplicate the column values) Avoid join(s) as much as possible, they tend to pull your query down. One hidden advantage is the fact that they impose simplicity in your queries.

* If you are dealing with bulk data, always use “load data infile” there are two options here, local and remote. Use local if the mysql and the application are in the same machine otherwise use remote.

* Try to split your complex queries into two or three simpler queries. The advantages in this approach are that the mysql resource is not hogged up for the entire process. Tend to use temporary tables. Instead of using a single query which spans across 5-6 tables.

* When you deal with huge amount of data, i.e you want to proces say 50,000 records or more in a single query try using limit to batch process the records. This will help you scale the system to new heights

* Always use smaller transaction(s) instead of large ones i.e spanning across “n” tables. This locks up the mysql resources, which might cause slowness of the system even for simple queries

* Use join(s) on columns with indexes or foreign keys

* Ensure that the the queries from the user interface have criteria or limit.

* Also ensure that the criteria column is indexed

* Do not have the numeric value in sql criteria within quotes, because mysql does a type cast

* use temporary tables as much as possible, and drop it…

* Insert of select/delete is a double table lock… be aware…

* Take care that you do not pain the mysql database with the frequency of your updates to the database. We had a typical case we used to dump to the database after every 300 records. So when we started testing for 500/sec we started seeing that the mysql was literally dragging us down. That is when we realized that the typicall at the rate of 500/sec there is an “load data infile” request every second to the mysql database. So we had to change to dump the records after 3 minutes rather than 300 records.

Tuning database schema

When you deal with huge amount of data, always ensure that you partition your data. That is your road to scalability. A single table with say 10 lakhs can never scale. When you intend to execute queries for reports. Always have two levels of tables, raw tables one for the actual data and another set for the report tables( the tables which the user interfaces query on!) Always ensure that the data on your report tables never grows beyond a limit. Incase you are planning to use Oracle, you can try out the partitioning based on criteria. But unfortunately mysql does not support that. So we will have to do that. Maintain a meta table in which you have the header information i.e which table to look for, for a set of given criteria normally time.

* We had to walk through our database schema and we added to add some indexes, delete some and even duplicated column(s) to remove costly join(s).

* Going forward we realized that having the raw tables as InnoDB was actually a overhead to the system, so we changed it to MyISAM

* We also went to the extent of reducing the number of rows in static tables involved in joins

* NULL in database tables seems to cause some performance hit, so avoid them

* Don’t have indexes for columns which has allowed values of 2-3

* Cross check the need for each index in your table, they are costly. If the tables are of InnoDB then double check their need. Because InnoDB tables seem to take around 10-15 times the size of the MyISAM tables.

* Use MyISAM whenever there is a majority of , either one of (select or insert) queries. If the insert and select are going to be more then it is better to have it as an InnoDB

Mysql helps us forge ahead!

Tune your mysql server ONLY after you fine tune your queries/schemas and your code. Only then you can see a perceivable improvement in performance. Here are some of the parameters that comes in handy:

* Use the buffer pool size which will enable your queries to execute faster –innodb_buffer_pool_size=64M for InnoDB and use –key-bufer-size=32M for MyISAM

* Even simple queries started taking more time than expected. We were actually puzzled! We realized that mysql seems to load the index of any table it starts inserting on. So what typically happened was, any simple query to a table with 5-10 rows took around 1-2 secs. On further analysis we found that just before the simple query , “load data infile” happened. This disappeared when we changed the raw tables to MyISAM type, because the buffer size for innodb and MyISAM are two different configurations.

for more configurable parameters see here.

Tip: start your mysql to start with the following option –log-error this will enable error logging

Faster…faster Web Client

The user interface is the key to any product, especially the perceived speed of the page is more important! Here is a list of solutions and learnings that might come in handy:

* If your data is not going to change for say 3-5 minutes, it is better to cache your client side pages

* Tend to use Iframe(s)for inner graphs etc. they give a perceived fastness to your pages. Better still use the javascript based content loading mechanism. This is something you might want to do when you have say 3+ graphs in the same page.

* Internet explorer displays the whole page only when all the contents are received from the server. So it is advisable to use iframes or javascript for content loading.

* Never use multiple/duplicate entries of the CSS file in the html page. Internet explorer tends to load each CSS file as a separate entry and applies on the complete page!

Bottomline
Your queries and schema make the system slower! Fix them first and then blame the database!

See Also

* High Performance Mysql

* Query Performance

* Explain Query

* Optimizing Queries

* InnoDB Tuning

* Tuning Mysql

Categories: Firewall Analyzer | Performance Tips
This page was last modified 18:00, 31 August 2005.

-Ramesh-