Wednesday, March 21, 2012

Data charmer's new slide

Slides from my presentation in Paris: "Testing early @mysql versions in a sandbox" http://t.co/fpTwwNV6 -- Giuseppe Maxia (@datacharmer)

MariaDB 5.3 is now GA-- Use it test it

This is another, in-case-you-missed-it, but it is definitely worth mentioning again:
MariaDB 5.3 is now GA
So, if you’re using MariaDB 5.1 or 5.2, I’d definitely recommend upgrading to the new MariaDB 5.3.
Also, if you’re a Windows user using MySQL 5.1, I’d highly consider making the switch to MariaDB 5.3 due to all of the Windows-specific improvements in it.
MariaDB 5.3 Enhancements:
  • Subquery optimizations
  • Semi-join subquery optimizations
  • Non-semi-join optimizations
  • Subquery Cache
  • Subquery Optimizations Map
  • Optimizations for derived tables and views
  • Disk access optimization
  • Join optimizations
  • Index Merge improvements
  • Optimizer control
  • NoSQL-style interfaces
  • Group commit for the binary log
  • Replication and binary logging enhancements
  • Microsecond support for NOW() and timestamp, time, and datetime columns
  • Windows performance improvements
  • And a number of other general improvements
MariaDB 5.3 Windows-Specific Performance improvements include:
  • Backported Windows performance patches from MySQL 5.5
  • Asynchronous IO in XtraDB is redesigned and is now faster, due to the use of IO completion ports
  • Additional durability option for XtraDB : innodb_flush_method can now be O_DSYNC, like on Unixes. (The effect of using this option is that the log file is opened with FILE_FLAG_WRITETHROUGH, and FlushFileBuffers() is not done. This may improve speed in write-heavy scenarios.)
  • A new Windows MSI installer
  • Includes a GUI-tool, HeidiSQL
All of the above, and more are documented in further detail here:
http://kb.askmonty.org/en/what-is-mariadb-53
You can download it here:
http://downloads.askmonty.org/mariadb/5.3/
(And just for reference, if running MariaDB you should probably keep your eye on the new MariaDB 5.5 too (5.5.20 was alpha, 5.5.21 is now beta), benchmarks here).
Hope this helps.

Why You Need a Part-Time Remote MySQL Expert

This is post by

Jonathan Levin

 

 Why You Need a Part-Time Remote MySQL Expert

When I thought to start to write this post, I was thinking about all the logical reasons why you would consider hiring a part-time remote MySQL database administrator or MySQL expert.
It then occurred to me that most of the readers, who are reading this post now, already know or can imagine the benefits of hiring a DBA to take care of their system.

So what I want to offer is a case based on the emotional benefits and value a part-time DBA can offer you and your business.


1) Peace of Mind

A DBA can offer you peace of mind that one of your core business components is being taken care of. It is like maintaining your house gas boiler or car every now to keep it running in good working order and preventing it from blowing up. Except that in this example, if it does break, you can't use the entire house or car until they are fixed.
What is important to remember here is that there is no immediate justification for spending money on maintenance. There is even a sense of loss when you do spend the money without seeing any value from it. You are left in a mental tug-of-war between the possibility of downtime and loss of profits to the immediate hit to your cash flow.

What usually helps here is to calculate the cost of downtime with the estimated time and effort to recover from it divided by the chance that it will happen.

In the event that your main database servers breaks down:

  • How much money are you losing from sales?
  • How much money are you losing from possible future sales? (For example, sales people and marketeers cannot send people to the website or loss of reputation)
  • How much money will it cost to get people (even at the dead of night) to resolve the problem? (people multiplied by hours or overtime hours)
  • How much disruption will it cause later on? (For example, sales people need to speak with clients to assure them everything is OK for two days instead of finding new clients)


Divided by - the chance that your database servers will break down.

  • Are we expecting any seasonal bursts of traffic and will the database servers handle it?
  • Will the hardware that the database server sits on hold up in the next 6 months?
  • How many single-points-of-failure are there in the environment where the database servers are?
  • How many people have DROP TABLE access to your servers and how often to people run "heavy" reporting queries on them?
  • How high is your developers skill level when it comes to writing efficient queries that prevent high database usage? (When releasing a new product or feature)

Once you answered all (or some) of those questions and jotted down some numbers, you will then have a figure of how much money you should spend to prevent downtime. This is a very basic risk management formula for managers and will allow you to get some perspective.
The mental tug-of-war can take a break as you are now allocating resources for something you planned a head of time.


2) Preventing loss of confidence

More often then not, I see a lot of small companies have people maintain their databases who do not have a lot of expertise to do it. Typically, if you have some developers, you ask one of them to do it. If you have a system administrator then that usually falls under that responsibility.

What happens then is that those people (usually, but not always) not fully understand their databases and just "keep them running". If something comes up that is a bit out of the ordinary then things start to get stressful.

I've even seen the database becomes the "don't touch it or it will break" system in the company.
At that point, you lose confidence in your system and prefer to not have to deal with it as much as possible.


3) Energy, Focus and Flow

When you have people with database expertise on hand, you can solve database related problems very quickly. Problems that were once difficult and complicated suddenly become straight forward.
For example, instead of having meetings discussing how to implement a very data intensive operation in the best way, you now have someone that can provide a quick answer or at least a direction to help implement it based on best practice and experience.
Your team can become more cross-functional as the expertise gets shared and solutions come more quickly.
You feel more in a "flow" - that things are moving in the right direction. You can focus on things which you would rather focus on you feel more energetic because of it.


4) Trust, Knowledge and Speed

Having an expert in your business and part of your team is very comforting. The more this expert is involved your business, the more this expert knows, understands and appreciate how your business runs and solves theirs problems. There is a cost benefit of having someone you trust and is knowledgeable about your business when you compare it to:

  1. Finding a new expert (Possible additional fees for system or agent that found the expert).
  2. Evaluating the person is in fact, an expert in their field.
  3. Explaining what the business problem is
  4. Double-checking if their solution does work or fully solves your problem.
  5. If you are not happy with them, go to step 1.
  6. If there was a misunderstanding in communication, go to step 3
  7. Implement solution


Put a price on each step and compare it to writing an email to your expert saying "we have a problem with that thing we spoke about a while back. Can you please take a look at it?"

In fact, I would go one step further. If your expert is part of your team and they "own" and are responsible for your database system, there is a good chance that they would have come to you after finding the problem themselves and with a possible solution.

I never fully appreciated outsourcing a lot of core parts of a business to one-time development shops. I believe there is valuable business-knowledge that gets lost and that the additional overhead to manage everything becomes very high.


Conclusion

I truly hope that this post may benefit people by giving them peace of mind, confidence and a clear direction that will help them with their business and make it more enjoyable.

Friday, April 22, 2011

Performance schema in MySQL 5.5 and 5.6


Configure, configure and configure

The performance schema is affected by three distinct set of configuration parameters, that take effect at compile time, server startup, or runtime.

Compile time options

When building from the source code, make sure the cmake flag 'WITH_PERFSCHEMA_STORAGE_ENGINE' is set to 'ON' (it is by default).

For packages built by Oracle, the performance schema is included by default.

Server startup options

Simply add the 'performance_schema' option to your my.cnf configuration file.

The effect of this option seems mis understood, leading people to think that the performance schema can only be enabled or disabled at server startup time, which is not the case.

The role of this startup option, with the related sizing parameters, is to initialize the performance schema internal memory buffers, and hook the performance schema instrumentation to the server and or plugins, so that everything is 'ready to go'. Note that 'ready to go' does not means 'enabled', it just means that things can be enabled or disabled later at runtime.

Runtime configuration

When the performance schema component is active in the server, it is listening to all events. Performance schema 'consumers' will decide, based on the content of the various setup tables in the performance_schema database, what to do with the event that just happened in the server code.

A table, performance_schema.setup_consumers, shows all the consumers available. This table has a ENABLED column that can be updated, giving the DBA full control on the internal performance schema execution flow.

There is a consumer which effectively controls globally all the data collection, so by turning this consumer ON or OFF, the entire performance schema instrumentation can be turned on or off, dynamically.

In 5.5, this consumer is named 'events_waits_current'. Note that this consumer in fact has two roles, as it controls both the overall data collection, and also the output table performance_schema.events_waits_current. This is a limitation, as there is no way to collect performance schema data independently of table events_waits_current.

In 5.6, this limitation has been lifted, so that the consumer which effectively control data collection is 'global_instrumentation', while the consumer named 'events_waits_current' controls only the table of the same name. The new consumer 'global_instrumentation' in 5.6 is the result of significant performance optimizations implemented in the code, made possible by decoupling the overall data collection from table events_waits_current.

Cheat sheet for mysql-5.5

To enable the performance schema at runtime (5.5), use the following query:

mysql> update performance_schema.setup_consumers set enabled='YES' where name='events_waits_current'; Query OK, 1 row affected (0.00 sec) Rows matched: 1  Changed: 1  Warnings: 0  mysql> select * from performance_schema.setup_consumers; +----------------------------------------------+---------+ | NAME                                         | ENABLED | +----------------------------------------------+---------+ | events_waits_current                         | YES     | | ...                                            ...     | +----------------------------------------------+---------+ 8 rows in set (0.01 sec) 

To disable the performance schema at runtime (5.5), use the following query:

mysql> update performance_schema.setup_consumers set enabled='NO' where name='events_waits_current'; Query OK, 1 row affected (0.00 sec) Rows matched: 1  Changed: 1  Warnings: 0  mysql> select * from performance_schema.setup_consumers; +----------------------------------------------+---------+ | NAME                                         | ENABLED | +----------------------------------------------+---------+ | events_waits_current                         | NO      | | ...                                            ...     | +----------------------------------------------+---------+ 8 rows in set (0.01 sec) 

Cheat sheet for mysql-5.6

To disable the performance schema at runtime (5.6), use the following query:

update performance_schema.setup_consumers set enabled='NO' where name='global_instrumentation'; 

To enable the performance schema at runtime (5.6), use the following query:

mysql> update performance_schema.setup_consumers set enabled='YES' where name='global_instrumentation';

Monday, September 14, 2009

Microsoft Launches New Open Source CodePlex Foundation

Microsoft’s strategy with open source has evolved over the past several years as we strive to make Windows the platform of choice for customers. My team has participated in that process first hand, we’ve worked hard with the PHP community to ensure PHP runs great on Windows, integrated PHP installation into the Microsoft Web Platform Installer, and engaged some of the most popular PHP applications like WordPress, Drupal, and SugarCRM to ensure customers have a great experience running these applications on Windows and IIS. We’ve also worked closely with the jQuery project to make it a natural part of building applications with ASP.NET.

Today I am happy to be a part of the announcement that Microsoft is sponsoring an open source foundation aptly named CodePlex Foundation, whose mission is to “enable the exchange of code and understanding among software companies and open source communities”. I believe the foundation will make it easier for Microsoft and other commercial software companies to participate in open source. You can read more about the announcement in my interview with Peter Galli on Port25 and learn more about the foundation at http://codeplex.org.

The CodePlex Foundation is a completely separate organization from Microsoft. To help form the foundation, we have formed an interim board of directors comprised of three Microsoft employees and three non-Microsoft employees, and elected Sam Ramji as the President of the Board. Microsoft has also donated $1 million US dollars to help the foundation get started and is transferring the use rights to the “CodePlex” term, along with the codeplex.org domain name to the CodePlex Foundation.

I feel lucky to be a part of the interim board of directors as we spend the next 100 days working together with the board of advisors, partners and you to structure how the foundation will work. We don’t have all of the answers and need your help to make it a success. You can read more about how to participate here: http://codeplex.org/participate.aspx

As always, I look forward to hearing your comments and suggestions about the new foundation.

Tuesday, September 4, 2007

DEVELOPER

Hi all
Now i am a developer . Now I am working on ASP.net . But I have still interesest in SEO so i am updating this.

Tuesday, July 31, 2007

SMO BLOGS to read

http://social-media-optimization.com/2007/07/social-media-questions-for-lee-odden-part-2/

http://www.leemccoy.co.uk/index.php // a cool blog

http://www.watblog.com/?content=detail&id=932

http://www.blogopreneur.com/

http://www.inaminuteago.com/mindtracks

http://ypnblog.com/blog/2007/07/09/optimizing-for-social-media/

http://blog.arhg.net/2007/06/yahoo-try-again-to-define-smo.html

http://www.creeper-seo.com/

http://ray963.spaces.live.com/Blog/cns!8ECAFEC9BD4D5C45!212.entry

http://www.seoscribe.com/?p=21

http://www.socialmediablog.co.uk/

http://newmediaetc.blogspot.com/2007/07/social-media-optimization-tips.html

http://www.dailyblogtips.com/101-blog-tips-i-learned-in-2006/

http://rohitbhargava.typepad.com/weblog/2006/08/5_rules_of_soci.html