Posts Tagged ‘speed’

How to: Improve Adobe Flash Player Video speed on Debian / Ubuntu Linux

Friday, October 12th, 2012

How to improve Adobe Flash Player Video, accelerate Flash video speed on Ubuntu, Xubuntu, Debian, Fedora - ArchLinux

I have recently installed Xubuntu to a friend with an old computer hardware. The computer is used just for basic access to the Internet web browsing – (Firefox, Opera) and Skype. All runs smoothly but sometimes the Videos in Youtube are lagging. Hence I looked for a way to make the Adobe Flash Player run smoother on this (Ubuntu 12.04) based Linux.

After a bit of searching if there is something written on the topic of Optimizing Flash Player / Flash Videos speed on Linux, I’ve stumbled acrossed one flash variable, which if used could improve Video Speed; The variable is OverrideGPUValidation and should be turned on in Flash Player with:


OverrideGPUValidation=true

The Flash Player configuration, settings on Linux could be set either globally by using:

  • /etc/adobe/mms.cfg – (system-wide configuration file, set Flash player policy for all existing users)

or locally for individual users through:

  • ~/.adobe/mms.cfg – (user-local configuration file affecting only /home/sampleuser/ flash player settings)

For Desktop Linux purposes which are used as a home desk station it is quite rarely the host to be used than more than one single user, so if that’s the case with you there is no worth to set OverrideGPUValidation=true via /etc/adobe/mms.cfg

Well anyways if need to set Flash player setting globally you will have to create /etc/adobe (which is created on deb flash player package install):


root@xubuntu:~# mkdir /etc/adobe
root@xubuntu:~# echo 'OverrideGPUValidation=true' >> /etc/adobe/mms.cfg

The local user (hidden) directory ~/.adobe is created automatically on first time the Flash Player is used in browser, just like usual with rest of Linux programs. Inside are a few directories created used by flash player but mss.cfg is not created.
For local users hence to enable OverrideGPUValidation=true type in terminal:

Enabling

user@xubuntu:~$ echo "OverrideGPUValidation=true" >> ~/.adobe/mms.cfg

The option does accelerate a bit the Flash Videos, but don’t expect huge speed ups. Normally using this option on some hosts up to 10 to 20/ 30% in Video playing (overall) speed, could be improved. On some hosts it is possible using the variable does not have a significant impact at all.

The options should work equal on Linux hosts and only Debian based ones as it is a Flash Player it is however tested with latest Flash Player Linux version which of time of writing this post is v. (11.2.202.243)
Don’t know if the same option will work on earlier Flash Player versions, so it is up to testing it. I will be glad to hear from people who tested the value and can report a speed improvement. I will be glad to hear the Video Adapter and general hardware configuration on whom OverrideGPUValidation=true speed up Flash Player.
Hope this tip helps someone.

How to speed up qmail qmail-smtpd response time on QmailRocks Thibs based install

Saturday, October 6th, 2012

I have recently installed Qmail following the Updated Debian QmailRocks Thibs Install

The qmail is configured just like Thibs points out the server was configured to a run qmail-smtpd script together with DJB’s Daemontools

I’ve figured out today connecting to the newly install Qmail host with telnet, using:


qmail:~# telnet mail.qmailhost.com 25
Trying 83.228.93.76...
Connected to mail.qmailhost.com.
Escape character is '^]'.
220 This is Mail mail.qmailhost.com ESMTP

Does a few seconds delay until my configured qmail greeting shows up. This is not a a deadly problem, but the delay itself might have a negative influence and make the host look like a spammer host to someone, hence I took few seconds to find a way to reduce this SMTP port connection delay.

The mail server responds on port 25, using qmail-smtpd so it was logical delay is caused somewhere by /service/qmail-smtpd/run (which actually links to /var/qmail/supervise/qmail-smtpd/run).

I did a quick review of /var/qmail/supervise/qmail-smtpd/run and found two lines that possibly create unnecessery delay, cause on each and every Port 25 connection request from repote SMTP server /usr/bin/head and /usr/bin/which are executed.
Here are two lines in /service/qmail-smtpd/run, I refer to:


LOCAL=`head -1 $VQ/control/me

(located on line 34)

and


TRUE=`which true`

located on line 116

The script was smartly written as planned to run on multiple Linux distributions. However since QmailRocks Thibs guide and my particular case needs to run on Debian Linux I think this is totally waste of system CPU time.

Therefore I substituted above two lines with:


LOCAL="/var/qmail/control/me"


TRUE="/bin/true"

I checked in /var/qmail/control/me I have only my primary mail server host defined, cause otherwise this changed could pose random mail server errors:


qmail:~# wc -l /var/qmail/control/me
1 /var/qmail/control/me
qmail:~# cat /var/qmail/control/me
mail.qmailhost.com

An updated version of /service/qmail-smtpd/run script you can download from here

If you don’t want to temper manually edit the script the quickest way is to overwrite old script with changed one, i.e.:


qmail:~# cd /var/qmail/supervise/qmail-smtpd
qmail:/var/qmail/supervise/qmail-smtpd# wget -q https://www.pc-freak.net/files/qmail-smtpd-daemontools-run
qmail:/var/qmail/supervise/qmail-smtpd# mv qmail-smtpd-daemontools-run run

To test connection time delay afterwards, you can use:


# time (echo HELO localhost | telnet mail.qmailhost.com 25)
Trying 83.228.93.76...
Connected to mail.qmailhost.com.
Escape character is '^]'.
Connection closed by foreign host.
real 0m0.070s
user 0m0.004s
sys 0m0.000s

Well still there is a connection delay – it is not so quick as smtp.gmail.com, but now connection response delay is better. For sake of comparison here is same test with Google’s SMTP:


$ time (echo HELO localhost | telnet smtp.gmail.com 25)
Trying 173.194.70.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
Connection closed by foreign host.
real 0m0.017s
user 0m0.004s
sys 0m0.000s

BTW a bit of time delay sometimes, can have a positive impact against spammers, as it can reduce a bit the amount of spammer mail servers connecting to the host. So i’m not sure if being 4 times slower in connection than Gmail is necessery bad 🙂

WP-Minify, Scripts Gzip and HeadJS Loader three scripts that might have positive impact on WordPress performance

Friday, September 23rd, 2011

I’m trying to get the most of server + wordpress performance and these days I’m heavily playing with it as one can read from my past few articles 😉

Today I’ve come across three other plugins which in many cases could be beneficial and bring a good performance increase in wordpress, this are:
 

  • WP-Minify – http://wordpress.org/extend/plugins/wp-minify/
  • HeadJS Loader – http://wordpress.org/extend/plugins/headjs-loader/
  • Scripts Gzip – http://wordpress.org/extend/plugins/scripts-gzip/

WP-Minify – does combine all JS and CSS script into one consolidated compressed script or style as well removes any duplicate script resources and hence could have positive impact on performance

HeadJS Loader – does strips out all your old javascript declarations and puts them into one head.js file so that they are loaded in parallel in the head of the pages and through that prevents the blocking of load up until all JS is a loaded so commonly seen these days on the net for more info on how HeadJS works check out http://headjs.com

Script Gzip – merges and compresses the CSS and JS links on page, the plugin does not have caching functionality. The plugin doesn’t have much configuration options which I find as a good thing

To find out what works best for you its a best practice if the website speed load time is tested after loading each of the plugins and with all of them enabled and configured, finally for best results just leave only the plugins or a combination of them which gives the lowest page responce times.

How to fix Thinkpad R61i trackpoint (mouse pointer) hang ups in GNU / Linux

Wednesday, February 1st, 2012

Earlier I've blogged on How to Work Around periodically occuring TrackPoint Thinkpad R61 issues on GNU / Linux . Actually I thought the fix I suggested there is working but I was wrong as the problems with the trackpoint reappeared at twice or thrice a day.

My suggested fix was the use of one script that does periodically change the trackpoint speed and sensitivity to certain numbers.

The fix script to the trackpoint hanging issue is here

Originally I wrote the script has to be set to execute through crontab on a periods like:

0,30 * * * * /usr/sbin/restart_trackpoint.sh >/dev/null 2>&1

Actually the correct values for the crontab if you use my restart_trackpoint.sh script are:

0,5,10,15,20,25,30,35,40,45,50,55,58 * * * * /usr/sbin/restart_trackpoint.sh >/dev/null 2>&3

ig it has to be set the script is issued every 5 minutes to minimize the possibility for the Thinkpad trackpoint hang up issue.

One other thing that helps if trackpoint stucks is setting in /etc/rc.local is psmouse module to load with resetafter= parameter:

echo '/sbin/rmmod psmouse; /sbin/modprobe psmouse resetafter=30' >> /etc/rc.local