Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 246 10 Older Entries

Displaying posts with tag: Programming (reset)

Tracing down a problem, finding sloppy code
+0 Vote Up -0Vote Down

Daniel was tracking down what appeared to be a networking problem….

  • server reported 113 (No route to host)
  • However, an strace did not reveal the networking stack ever returning that.
  • On the other side, IP packets were actually received.
  • When confronted with mysteries like this, I get suspicious – mainly of (fellow) programmers.
  • I suggested a grep through the source code, which revealed  return -EHOSTUNREACH;
  • Mystery solved, which allowed us to find what was actually going on.

Lessons:

  • Don’t just believe or presume the supposed origin of an error.
  • Programmers often take shortcuts that cause grief later. I fully appreciate how the above code came about, but I still think it was wrong. Mapping a
  •   [Read more...]
    GUUG Frühjahrsfachgespräch 2014: CfP ends on May 31st!
    Employee +0 Vote Up -0Vote Down

    The German Unix User Group (GUUG) will hold their annual conference "Frühjahrsfachgespräch" on September 23-26 this year (I know, not really "Frühjahr" anymore, but this is how it is).

    The Call for Presentations is still open until May 31st. Talks can be proposed in German and English, and there are slots for longer tutorials as well.

    The range of possible topics is broad, so if you think you have anything interesting to share with a very passionate and technical audience of sysadmins and developers, here are some suggestions:

    • Operating Systems/Applications: architectures, privilege concepts, new developments, administration, mobile systems
    • Relevant new OS Kernel
      [Read more...]
    Using MASTER_GTID_WAIT() to avoid stale reads from slaves in replication
    +2 Vote Up -0Vote Down

    I have just implemented MASTER_GTID_WAIT() in MariaDB 10.0. This can be used to give a very elegant solution to the problem of stale reads in replication read-scaleout, without incuring the overheads normally associated with synchronous replication techniques. This idea came up recently in a discussion with Stephane Varoqui, and is similar to the concept of Lamport logical clock described in this Wikipedia article.

    I wanted to describe this, hoping to induce people to test and maybe start using this, as it is a simple but very neat idea, actually.

    A very typical use of MariaDB/MySQL replication is

      [Read more...]
    Correcting mysql.sock connection error
    +0 Vote Up -0Vote Down

    I write this post over to have a quick access to this tutorial than to promote the blog. The problem For Several times this has happened to me, always install a new server, or personal machine. I install mysql ,… Continue Reading →

    Continue reading Correcting mysql.sock connection error

    Related posts:
  • Corrigindo erro de conexão com mysql.sock
  • zend framework 2 with lighttpd
  • Main Subversion commands
  • More on 40% better single-threaded performance in MariaDB
    +1 Vote Up -0Vote Down

    In my previous post I wrote about how I achived a >40% speedup on sysbench read-only using profile-guided optimisation (PGO). While this is a preliminary result, I though it was so interesting that it deserved early mention. The fact that any benchmark can be improved that much shows clearly that PGO is something worth looking into. Even if we will probably not improve all workloads by 40%, it seems highly likely that we can obtain significant gains also for many real workloads.

    I had one or two interesting comments on the post that raise valid concerns, so I wanted to write a follow-up here, explaining some of the points in more details and going deeper into the performance counter measurements. As I wrote before, actual observations and measurements are crucial to fully understand performance of

      [Read more...]
    40% better single-threaded performance in MariaDB
    +5 Vote Up -0Vote Down

    Continuing my investigation of single-threaded performance in the MariaDB server, I managed to increase throughput of single-threaded read-only sysbench by more than 40% so far:

    I use read-only sysbench 0.4.12 run like this:

        sysbench --num-threads=1 --test=oltp --oltp-test-mode=simple --oltp-read-only --oltp-skip-trx run
    

    And mysqld is run with minimal options:

        sql/mysqld --no-defaults --basedir=X --datadir=Y --innodb-buffer-pool-size=128M
    

    With modern high-performance CPUs, it is necessary to do detailed measurements using the built-in performance counters in order to get any kind of understanding of how an application performs and what the bottlenecks are. Forget about looking at the code and counting instructions or cycles as

      [Read more...]
    MySQL/MariaDB single-threaded performance regressions, and a lesson in thread synchronisation primit
    +5 Vote Up -1Vote Down

    I took a quick look at MariaDB 10.0 single-treaded performance (simple read-only sysbench). One thing immediately leaps to the eye, and I thought it worthy of mention. It contains an important lesson about the use of synchronisation primitives and in particular "atomic operations" in MariaDB (and MySQL).

    I am using the Linux perf tool on this sysbench command:

      sysbench --num-threads=1 --test=oltp --oltp-test-mode=simple --oltp-read-only --oltp-skip-trx
    
    Look at the top offender in the output from perf report:
      1,54%  mysqld  mysqld               [.] set_thread_state_v1
    
    The only thing this does is set a string for SHOW PROCESSLIST (and the like) about what the thread is doing. And we are spending a whopping 1.5% of the total time doing this.

    And why? That becomes clear when looking

      [Read more...]
    Connecting your Linux to a Cisco AnyConnect (SSL) – part 3
    +0 Vote Up -0Vote Down

    Hi there !

     

    This is the final part of using openconnect  - You can check the older ones below:

    http://www.heitorlessa.com/connecting-your-linux-to-a-cisco-anyconnect-ssl-part-1/

    http://www.heitorlessa.com/connecting-your-linux-to-a-cisco-anyconnect-ssl-part-2/

     

    As mentioned previously, we will be covering here:

    • How to create a script to monitor such VPN using ICMP, and restart that VPN if it is down

     

    I would say, this is very straight forward and does not require much knowledge, so we are going to follow the same procedure as part 2 – Show the script in


      [Read more...]
    Connecting your Linux to a Cisco AnyConnect (SSL) – Part 2
    +0 Vote Up -0Vote Down

    Hey you!

    As said in the part 1 of this article, I will be covering here:

    • How to create a openconnect init script

    So, concerning the init script I will be posting parts of the script first, and then will put a link for download at the end.

    First of all, we need the shebang (#!/bin/bash) and then global variables that will be used along the script:

    # Path variables
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    
    # VPN Variables
    IFACE="sslvpn"
    VPN_USER="vpn_user"
    VPN_HOST="sslvpn.yourdomain.com"
    VPN_PASS="vpn_password"
    PID="/var/run/openconnect.pid"
      [Read more...]
    First steps with MariaDB Global Transaction ID
    +8 Vote Up -1Vote Down

    My previous writings were mostly teoretical, so I wanted to give a more practical example, showing the actual state of the current code. I also wanted to show how I have tried to make the feature fit well into the existing replication features, without requiring the user to enable lots of options or understand lots of restrictions before being able to use it.

    So let us start! We will build the code from lp:~maria-captains/maria/10.0-mdev26, which at the time of writing is at revision knielsen@knielsen-hq.org-20130214134205-403yjqvzva6xk52j.

    First, we start a master server on port 3310 and put a bit of data into it:

        server1> use test;

      [Read more...]
    Showing entries 1 to 10 of 246 10 Older Entries

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.