Optimización con Prelink (I)
Buenas,
Se ha hablado mínimamente del uso del prelink, algo similar a un cache de librerías y aplicaciones que carga en memoria las más usadas para acelerar el proceso de carga.
La disputa es que con el hardware actual es posible que no se note dicha aceleración o provoque problemas en equipos actualizados frecuentemente.
En parte el proceso de boot si está afectado y sí lo acelera, pero puede causar errores en equipos con entornos gráficos.
Una solución es utilizar un cron periódico que lo actualice y lo mantenga listo con las últimas modificaciones del sistema.
Un listado de salida o del log podría ser este:
/usr/sbin/prelink -a -mR -T -q
2012-12-30 11:53:52 pre link: Could not prelink /usr/bin/ufraw-batch because its dependency /usr/lib/libexiv2.so.9.0.0 could not be prelinked
2012-12-30 11:53:53 pre link: Could not prelink /usr/bin/shotwell because its dependency /usr/lib/libgexiv2.so.0.0.0 could not be prelinked
2012-12-30 11:53:53 pre link: /usr/bin/clinfo: Could not parse `/usr/bin/clinfo: /usr/lib/libOpenCL.so.1: no version information available (required by /usr/bin/clinfo)’
2012-12-30 11:53:56 pre link: Could not prelink /usr/lib/libmediastreamer.so.0.0.0 because its dependency /usr/lib/libortp.so.8.0.0 could not be prelinked
2012-12-30 11:53:56 pre link: Could not prelink /usr/bin/linphone-3 because its dependency /usr/lib/libortp.so.8.0.0 could not be prelinked2012-12-30 11:54:28 pre link: /usr/lib/xulrunner-1.9.1/xulrunner-bin: Could not find one of the dependencies
2012-12-30 11:54:28 pre link: /usr/lib/xulrunner-1.9.1/xpcshell: Could not find one of the dependencies
2012-12-30 11:54:29 pre link: Could not prelink /usr/lib/gnome-applets/mediastream because its dependency /usr/lib/libmediastreamer.so.0.0.0 could not be prelinked
2012-12-30 11:54:29 pre link: /usr/lib/iceape/plugin-container: Could not find one of the dependencies
2012-12-30 11:54:29 pre link: /usr/lib/iceape/iceape-bin: Could not find one of the dependencies
2012-12-30 11:54:29 pre link: /usr/lib/icedove/icedove-bin: Could not find one of the dependencies
2012-12-30 11:54:30 pre link: /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x64-1/plugins/bin/vmware-vmrc-legacy: Could not find one of the dependencies
2012-12-30 11:54:30 pre link: /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x64-1/plugins/bin/vmware-vmrc: Could not find one of the dependencies
2012-12-30 11:54:30 pre link: /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x64-1/plugins/bin/vmware-vmrc-daemon: Could not find one of the dependencies
2012-12-30 11:54:31 pre link: /usr/lib/vmware/bin/vmware-hostd: Could not find one of the dependencies
2012-12-30 11:54:33 pre link: /usr/lib/vmware-ovftool/ovftool.bin: Could not find one of the dependencies
2012-12-30 11:54:34 pre link: /usr/lib/iceowl/iceowl-bin: Could not find one of the dependencies
2012-12-30 11:54:34 pre link: /usr/lib/vmware-vcenter-converter-standalone/bin/net: Could not find one of the dependencies
2012-12-30 11:54:35 pre link: /usr/lib/vmware-vcenter-converter-standalone/bin/smbclient: Could not find one of the dependencies
2012-12-30 11:54:35 pre link: /usr/lib/vmware-vcenter-converter-standalone/vmware-converter: Could not find one of the dependencies
2012-12-30 11:54:35 pre link: /usr/lib/vmware-vcenter-converter-standalone/converter-gui: Could not find one of the dependencies
2012-12-30 11:54:36 pre link: /usr/share/ati/lib64/libQtGui.so.4 is not present in any config file directories, nor was specified on command line
2012-12-30 11:54:36 pre link: /usr/share/ati/lib64/libQtCore.so.4 is not present in any config file directories, nor was specified on command line
Descartamos que sea el Wine ya que es conocido que no se puede usar el prelink y da errores.
Para empezar ejecutamos esto
prelink -amR –verbose
Actualizará las aplicaciones, reducirá el uso de memoria y lo hará en desorden por seguridad. A parte indicará los motivos por los cuales no se puede cachear algunos de esos errores.
Configuramos el fichero /etc/cron.daily/prelink para que ejecute tareas diariamente.
Toca asegurarse que en /etc/default/prelink esté así
PRELINKING=yes
dejando la opción por defecto deshabilitada con un # delante:
#PRELINKING=unknown
añadimos a:
PRELINK_OPTS=-mR
la a correspondiente a todas las aplicaciones
PRELINK_OPTS=-amR
Si aparece algún problema con las aplicaciones podemos usar esto para deshabilitar el cacheado de aplicaciones:
prelink -ua
El rendimiento mejora sustancialmente si lo combinamos con preload y IrqBalance
Saludos