Showing entries 121 to 130 of 1336
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Linux (reset)
vm.swappiness and OOM in RHEL6

The behavior of vm.swappiness was always a bit confusing for novice linux users, as setting vm.swappiness to 0 would not completely disable swapping in the system during a memory crunch. vm.swappiness would only affect the agressiveness of swapping.

Following upstream commit tried to give more control to parameter. This commit tried to avoid swapping completely when vm.swappiness is set to 0.

commit fe35004fbf9eaf67482b074a2e032abb9c89b1dd
Author: Satoru Moriya
Date: Tue May 29 15:06:47 2012 -0700
mm: avoid swapping out with swappiness==0

With above commit, setting vm.swappiness to “0” instructs the kernel not to initiate swapping until the amount of free and file-backed pages is less than the high water mark in a memory zone. In other words, it tries to reclaim as much memory that can be reclaimed, before swapping starts.
This greatly reduced the chances of swapping.

When this …

[Read more]
Running Percona XtraDB Cluster nodes with Linux Network namespaces on the same host

This post is a continuance of my Docker series, and examines Running Percona XtraDB Cluster nodes with Linux Network namespaces on the same host.

In this blog I want to look into a lower-level building block: Linux Network Namespace.

The same as with cgroups, Docker uses Linux Network Namespace for resource isolation. I was looking into cgroup a year ago, and now I want to understand more about Network Namespace.

The goal is to both understand a bit more about Docker internals, and to see how we can provide network isolation for different processes within the same host. You might need to isolate process when running several MySQL or MongoDB instances on the same …

[Read more]
Linux User-Group Console

This post shows you how to add the menu option and GUI to set users and groups. It’s quite a bit easier than mastering all the command-line syntax. It makes setting up the required user and group accounts for an Oracle Enterprise or MySQL database solution much easier.

You add the utility by calling the yum (Yellowdog Updater, Modified) utility like this:

yum installed -y system-config_users

You should see the following:

Loaded plugins: langpacks
adobe-linux-x86_64                                       |  951 B     00:00     
ol7_UEKR3                                                | 1.2 kB     00:00     
ol7_latest                                               | 1.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package system-config-users.noarch 0:1.3.5-2.el7 will be installed
--> Processing …
[Read more]
How to Setup MySQL Master-Master Replication

This article consolidates information from several sources into the format I use to setup MySQL Master/Master Replication. The beauty of Linux and open source is that there are many different ways to do this. Please take a look at my references and use them to accommodate any needs you may have.

linux memory management for servers

We’ve been learning for many years how to run Linux for databases, but over time we realized that many of our lessons learned apply to many other server workloads. Generally, server process will have to interact with network clients, access memory, do some storage operations and do some processing work – all under supervision of the kernel.

Unfortunately, from what I learned, there’re various problems in pretty much every area of server operation. By keeping the operational knowledge in narrow camps we did not help others. Finding out about these problems requires quite intimate understanding of how things work and slightly more than beginner kernel knowledge.

Many different choices could be made by doing empiric tests, sometimes with outcomes that guide or misguide direction for many years. In our work we try to understand the reasons behind differences that we observe in random poking at a problem.

In order …

[Read more]
Docker for Mac beta and MySQL - First impressions

Using Docker for development is a great way of ensuring that what you develop will be the same that you deploy in production. This is true for almost everything. If you develop on Linux, the above statement holds. If you develop on a different operating system (OSX or Windows) there are several restrictions.

I showed one of those issues in a recent article (MySQL and Docker on a Mac: networking oddity.) When you want to export a port from a service running in the container, the exported port is not available in your mac, but in the virtual machine that runs Docker services. This happens with any application that listens to a port.

The second limitation I found affects only MySQL, and it is related to using volumes. The proper way of achieving data persistence with …

[Read more]
Ubuntu 16.04 first stable distro with MySQL 5.7

Ubuntu 16.04 artwork by Canonical Ltd (CC-BY-SA).

Congratulations to Ubuntu on releasing 16.04 LTS with MySQL 5.7! As far as I know, it’s the first stable release of a Linux distro that contains MySQL 5.7. Fedora and openSUSE also have MySQL 5.7, but not yet in a stable release.…

Install python and pip as local user on shared Linux

A few days ago, I was struggling to install python on a Linux machine, in which I had no root permission. That machine was shared with many other users and there was only an old python version already installed on the machine. After a bit of search and trial, I was able to install a newer version of python on this machine to my local directory.

My goal was to run a program developed under python 2.7 on the Linux server which already had python 2.6 installed. As you can see, it was impossible for me to upgrade python on the system because I had no root permission. The only solution was to install the python 2.7 into my local directory and override the necessary environment variables. Even though this blog aims for python 2.7, I believe it should also be the same for python 3.0. The detailed steps are as follows:

  1. Install python to local directory

Firstly, I create a folder in my home directory, download the …

[Read more]
Docker MySQL Replication 101

In this blog post, we’ll discuss some of the basics regarding Docker MySQL replication. Docker has gained widespread popularity in recent years as a lightweight alternative to virtualization. It is ideal for building virtual development and testing environments. The solution is flexible and seamlessly integrates with popular CI tools.

 

This post walks through the setup of MySQL replication with Docker using Percona Server 5.6 images. To keep things simple we’ll configure a pair of instances and override only the most important variables for replication. You can add whatever other variables you want to override in the configuration files for each instance.

Note: the configuration described here is suitable for development or testing. We’ve also used the …

[Read more]
Understanding things inside ~/.ssh

We have been using SSH all the time but not all people really understand the files we put inside the ~/.ssh folder on our computer. It was a myth to me when I was first using SSH, but things are pretty clear to me now and I want to share this with all of you, just in case you don't know.

known_hosts

This file is responsible for verifying the host we have connected to. If it was the first time you connect to a host, you would probably see the following message:

The authenticity of host 'example.com (10.0.0.0)' can't be established.
RSA key fingerprint is    SHA256:VqgUG8v+gxrigR1csELYv6Un6l7HxMgPgMj9wyUr7G4.
Are you sure you want to continue connecting (yes/no)?

The moment you select yes to continue connecting, the hostname along with the public key of the server will be saved as a new line in this file. Why we need this file? Just imagine that for some reason our routing has …

[Read more]
Showing entries 121 to 130 of 1336
« 10 Newer Entries | 10 Older Entries »