Bitz-N-Bitez

Max Throughput = # CPUs + 1

Playing around with a simple benchmarking workload.    Its a highly simplified generic order processing workload.   We read a random customer from the customer table then pick between 1 to 10 products for them to order, reading each product from the product table.   Finally we create records in the orders and orders_detail tables.   The workload is generated by a custom java multi threaded app that I wrote.

For this test we have a small number of customers (1000) and products (800) which means our reads are 100% cached in ram.   If they are not in the postgres buffers they will be in the filesystem buffer on this sytem.  Disk is almost never accessed except when postgres needs to flush stuff out to disk.  We have a quad core with 16 GB ram.

IO is not the limiting factor here.  CPU workload is split between the java stuff and the postgres processes.

What we see above is that our max throughput per thread is hit when the number of threads equals the number of processor cores.  However the max system throughput is hit when we have one more java thread/database connection than processors.

I repeated the process cycle a second time to see if the results held.  Overall a slight increase in throughput across the boards but the peaks at # of processors for max per thread, and # of processors plus one for total throughput still held.

One item of note is the consistent large jump when going from 3 to 4 threads.   Its very non linear and as of right now I cannot explain it.

Advertisements

Clover ETL — Linux DBA’s Best Friend

If you have not kicked the tires on the Clover ETL product you should.   Its an excellent ETL tool supporting a wide variety of DBMS platforms etc.   Its enterprise ready but also comes with a community edition ( geek speak for FREE ) which is a lot of use for a home Linux fellow who is doing work with many different RDBMS platforms.

Grains Make Us Fat — Period

Grain based diets make us fatter, period.   The stats I have read state that on average Americans are 17 lbs over their ideal weight.   That is pretty close to how much weight I gain or loose switching my diet between a grain based one a protein based one.

A few months ago for the the first time in my life I tried a diet.    I’ve watched dieters for years and noted that few have ever had success.   And of the ones that did have success they were a miserable bunch.   Always moping and hungry etc.   I noticed though that those on a high protein diet, were never hungry and lost weight.  So I tried it.   Essentially my diet was all the meat and veggies I could eat, with cheeses, gravies and sauces thrown in ( and a glass or two of wine ).    I did not eat grains or fruits.   The result was over the next few months I lost 18 lbs.  I was never hungry, I ate when I wanted, ate as much as I felt like I wanted.

The question in any diet is “But can you keep it off ?”

From personal experience the answer is yes.  I can keep the 18 lbs off however not if I add grains back into my diet.   If I decide to start eating grains I will gain weight.   This is repeatable at will.   Add grains weight goes up, remove grains weight goes down.

There are a few people who wear white labcoats and carry clipboards and are thus called “scientists” or “nutritionists” or “doctors” who point this out.    The overwhelming majority of them however insist this simply is not true.    I can reproduce this at will in my body.  My wife can reproduce this in her body every time we vary our diet the result is consistent.   It is so consistent and reproducible that one must ask the question why its not pointed out by “scientists/doctors/etc.”

The reason can either be they are not attempting to find this out because they have high grain diet blinders, they scuttle results when they show up, or most likely those that do discover and report this tend not get further funding from the various big science funding centers.