20111231

Minimizar swap

Minimizar el uso de la swap (swappiness)

Por defecto en ubuntu, el valor de swappiness esta en 60%, es decir que se utiliza frecuentemente la memoria de intercambio (swap). Esto es muy útil si tienes un servidor con gran carga de trabajo y poca RAM, o si compilamos frecuentemente aplicaciones muy grandes. Pero en un sistema de escritorio estándar, con varias aplicaciones pequeñas ejecutándose, podemos bajar este valor a 10% para que el núcleo del sistema use más a menudo la memoria RAM (más rápida que la swap), teniendo en consecuencia un sistema más veloz.

- Se consulta el valor inicial de la swappiness. En el terminal escribimos:

$ sudo cat /proc/sys/vm/swappiness

introducimos la contraseña y tecleamos enter, y nos mostrará un valor de 60 (si nos llegara a mostrar 10, ya no hay que hacer nada aquí).

- Luego probamos el sistema a ver como funciona si reducimos el valor a 10. En el terminal:

$ sudo sysctl -w vm.swappiness=10

Ejecutamos algunas aplicaciones a ver como responde el sistema, si el resultado es satisfactorio procedemos a hacer el cambio permanente. En el terminal:

$ sudo nano /etc/sysctl.conf

y en la última linea añadimos:

vw.swappines=10

Guardamos con CTRL+O y salimos con CTRL+X




conky minino:


# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

alignment bottom_right
background yes
border_width 1
cpu_avg_samples 2
default_color orange
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont Sans:size=12
gap_x 5
gap_y 3
minimum_size 5
maximum_width 70
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_type desktop
own_window_transparent yes
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
top_cpu_separate yes
double_buffer yes

TEXT
${font Sans:size=10}
${color grey}Bat:
${color green}${alignr}$battery_time
#${color green}${alignr}3h:34:56
${color blue}$hr
${color grey}CPU:
${color green}${alignr}$cpu%
${color blue}$hr
${color grey}Temp:
${color green}${alignr}${acpitemp}ºC
${color blue}$hr
${color grey}M.S:
${color green}${alignr}${totalup wlan0}
${color blue}$hr
${color grey}M.D:
${color green}${alignr}${totaldown wlan0}