Showing entries 27031 to 27040 of 44919
« 10 Newer Entries | 10 Older Entries »
iostat: (r/s + w/s) * svctm = %util on Linux

iostat -x is very useful to check disk i/o activities. Sometimes it is said that "check %util is less than 100%" or "check svctm is less than 50ms", but please do not fully trust these numbers. For example, the following two cases (DBT-2 load on MySQL) used same disks (two HDD disks, RAID1) and reached almost 100% util, but performance numbers were very different (no.2 was about twice as fast as no.1).

# iostat -xm 10
avg-cpu: %user %nice %system %iowait %steal %idle
21.16 0.00 6.14 29.77 0.00 42.93

Device: rqm/s wrqm/s r/s w/s rMB/s wMB/s
sdb 2.60 389.01 283.12 47.35 4.86 2.19
avgrq-sz avgqu-sz await svctm %util
43.67 4.89 14.76 3.02 99.83


# iostat -xm 10
avg-cpu: %user %nice %system %iowait %steal %idle
40.03 0.00 16.51 16.52 0.00 26.94

Device: rrqm/s wrqm/s r/s …
[Read more]
What Wikipedia looks like when their database goes away



An unknown error connecting to MySQL on 10.0.6.28? Oh dear me… It came back up within 2 minutes though from the time I got the screenshot.


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Platform: Linux/Unix

If you come across below errors when trying to connect MySQL then there might be couple of reasons behind it.



-bash-3.2$ mysql --user=root --password

Enter password:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

One of the reason could be that MySQL server isn't running. So how do you check whether or not MySQL is running? try running below shell command and see what it reports


-bash-3.2$ ps -e|grep mysqld
30878 ? 00:00:00 mysqld_safe
30939 ? 00:58:06 mysqld
-bash-3.2$


If you see at least 2 process are running/listed from the above command then it is confirmed that MySQL is running.
What if you don't see any process(as shown below)? then the MySQL services is not at all running then try to start it and watch …

[Read more]
memcached Functions for MySQL now on launchpad

Hi all,

This is a quick post to let you know that the memcached functions for MySQL have been moved to Launchpad. The project page is: https://launchpad.net/memcached-udfs

I think this will help to get the project more exposure, as well as making it easier for people to contribute to the project. I've found Launchpad to be quite useful for managing projects and so decided to move the UDFs there.

I'm working on getting out another version soon. I just fixed a bug the deals with user-defined variables that were set to NULL causing the UDFs to crash the server. It was a bug in the length of the argument being set to 8192


For instance, the first explicitly:

mysql> select memc_set('nullval', null);

(gdb) p args->args[1]
$3 = 0x0
(gdb) p args->lengths[1]
$4 = …

[Read more]
North Texas MySQL Meeting

The next meeting of the North Texas MySQL Users Group will be Monday, August 3rd 2009 at 7PM sharp. We will meet at the Sun Offices, Suite 700, 16000 Dallas Tollway, Dallas.

The presentation will be on MySQL Basics -- How to install and run a MySQL database. This is an introductory level talk but experienced folks are invited to contribute their insights also. We hope to have a series of talks for those just starting with MySQL so that later we can build demand for more advanced topics.

Using Windows multiple memory heaps for finding leaks

If you, like me (but sometimes I feel it's just me left) use C and the Win32/Win64 API for Windows programming, you might be interested in this little trick which I use quite often on Windows to make sure I do not have any memory leaks.

Usually, you allocate from the heap using something like malloc for a level of portability, as the Windows HeapXxx calls are Windows specific, and malloc maps to these guys anyway. usually.

In Windows, each process has a default heap. In most cases, DLL data is private, but heap allocations are usually done from the Process heap. This causes a memory allocation issue that is all too common: There may be a memory leak, and again, it may not be, as everyone is allocating data from the same heap, including any libraries, static or dynamic, that you may use, when all you want to know is if you have a leak in your code.

And this what you can do here: Although a process has a …

[Read more]
Using linguistic indexes for sorting in open source databases

Here I'm following up my previous post Using linguistic indexes for sorting in Oracle. I don't much like the Oracle solution, that requires creating a special index to speed up sorting, but... at the same time its very powerful, allows to index in many languages and no database changes are needed.

In this post I’ll take a look at the two popular open source databases MySQL and PostgreSQL. I'll take a look only at features, that the database has included and that can be used without any special application changes.

PostgreSQL 8.4

Starting from 8.4, collation (sorting) rules can be defined per database and there is no possibility to set it in session level. All sorting and all indexes are ordered according to the database collation locale. In previous versions there was only one …

[Read more]
MySQL Workbench 5.2.2 ALPHA Out

The MySQL Workbench team announces the availability of version 5.2.2 - the 3rd ALPHA release - of our database development tool.

Since the last alpha release, several bugs has been fixed and fixes from the 5.1 branch were also included. No major new features are included in this version, but upgrade from previous versions of Workbench 5.2 is recommended. However, please note that this is still an ALPHA release of Workbench 5.2 For database modeling use, please consider using the latest version of Workbench 5.1

For a QuickTour of the latest Query Browser features, see:  http://dev.mysql.com/workbench/?page_id=236

The files for different platforms have been pushed to our main server and will be globally available on our mirrors during the next hours.

[Read more]
Automating MySQL Librarian tasks



The MySQL Librarian is a collection of community generated content, easy to search and to extend. If you have missed the announcement, you may look at Introducing the MySQL Librarian..
To add a new link, you have several ways. You can just use the Add A Link feature inside the Librarian. If the link to be added comes from Planet MySQL, every post has a link to facilitate the insertion to the Librarian. For everything else, adding a link is a manual task. Until today. …
[Read more]
Profile guided optimization with gcc

Yesterday I wrote how certain build optimizations can have performance differences – and I decided to step a bit deeper into a quite interesting field – profile guided binary optimization. There’re quite a few interesting projects out there, like LLVM (I hear it is used extensively in iphone?) – which analyze run-time profile of compiled code and can do just in time adjustments of binary code. Apparently, you don’t need that fancy technology, and can use plain old gcc.

The whole plan is:

  1. Compile all code with -fprofile-generate in {C|CXX|LD}FLAGS
  2. Run the binary
  3. Run your application/benchmark against that binary
  4. Recompile all code with -fprofile-use (above steps will place lots of .gcda files in source tree)
  5. PROFIT!!! (note the omission of “???” step)

How much …

[Read more]
Showing entries 27031 to 27040 of 44919
« 10 Newer Entries | 10 Older Entries »