28th March 2015
About 2 years ago I had already reviewed some parallel (and not) compressing utilities, settling at that time on pbzip2 – it scales quasi-linearly with the number of CPUs/cores, stores compressed data in relatively small 900k blocks, is fast, and has good compression ratio. pbzip2 was (and still is) a very good choice.
Yesterday I got somewhat distracted, and thus found lbzip2 -
an independent, multi-threaded implementation of bzip2. It is commonly the fastest SMP (and uniprocessor) bzip2 compressor and decompressor
- as it says in the Debian package description. Is it really “commonly the fastest” one? How does it compare to pbzip2? Should I use lbzip2 instead of pbzip2?
This minor distraction had grown into a full-scale web-search and comparison, adding to the mix plzip (a parallel version of lzip), xz, and lrzip. After reading thousands of characters, all of these were put to a simple test: compressing an about 2 gigabyte FASTQ file with default options.
All the external links and benchmarks, as well as my own mini-benchmark results, are provided below.
The conclusion is that out of all the tested compressors lbzip2 is indeed the best one (for my practical use). It is only slightly better than the trusty pbzip2, which takes the second place. All the other compressors performed so poorly, that they do not get any place in my practical rating…
So, let us first ask internet wisdom/foolishness, if lbzip2 or pbzip2 is faster/better?
Read the rest of this entry »
Posted in *nix, Comparison, Links, Misc, Software | 6 Comments »
13th March 2015
I have recently realized that my planning habits are quite similar to what The Secret Weapon promotes. However, my planning is not as elaborate and detailed/structured as TSW, and I am using several tools:
- Google Keep, an awesome note-taking and to-do lists application with a really good web-interface, and free;
- Trello, convenient lists/projects/tasks management platform (especially for group work), and free;
- Google Calendar, the de facto calendar standard for Android phones, and free;
- my A5 format weekly paper planner, and… the only not free component.
It is easy to see that I am using too many tools.
In an effort to use less tools, and also to try some of the features of TSW, I’ve performed a brief search for GTD/TSW-compatible Android apps.
TSW website is built around the Evernote app. However, I am not sure if this would be a good solution for me, as I have been already using Evernote since several years for longer-term note-keeping, and thus already have a bunch of notepads, notes, and tags there. Moreover, Evernote’s website mentions something about “offline notes” in the Premium (non-free) tier for mobile apps; this hints at the requirement to have internet connectivity to be able to work with TSW+Evernote efficiently through the day.
Oh, before I forget: all the 4 tools that I am using have their purpose, with overlap between Keep and Trello.
My A5 format paper planner (weekview compact 2015) is not a simple weekly planner; it has a structure that stimulates goal-oriented planning.
More specifically, it provides means to plan:
Read the rest of this entry »
Posted in Comparison, Links, Misc, Notepad, Software | No Comments »
28th February 2015
After fixing offline uncorrectable sector warning email, I have taken a closer look at my /etc/smartd.conf, and now it looks like this:
DEFAULT -d sat -H -f -p -t -W 0,40,45 -n standby -S on -m example@example.com
# Attributes 1, 230, and 231 are very important (-r 1! -r 230! -R 230! -r 231! -R 231!), but likely covered by -t.
/dev/sda -s (S/../../6/01|L/../(01|02|03|04|05|06|07)/7/00) -C 0 -I 189 -I 194
# -a implies -f and -p (through -t)
DEFAULT -d sat -a -I 194 -W 0,40,45 -n standby -o on -S on -m example@example.com
/dev/sdb -s (S/../../6/02|L/../(01|02|03|04|05|06|07)/7/02)
# This drive does not decrement Offline_Uncorrectable (198) after re-allocation,
# so only monitoring for increase, not for non-zero value.
/dev/sdc -s (S/../../6/03|L/../(01|02|03|04|05|06|07)/7/04) -U 198+
# This drive has 40 “normally”.
/dev/sdd -s (S/../../6/04|L/../(01|02|03|04|05|06|07)/7/06) -W 0,42,45
Note: explanations below are intentionally simplified; please consult man smartd.conf for more precise, complete, and up-to-date information.
Ok, so what do these settings mean, and how is this different from default settings?
Read the rest of this entry »
Posted in *nix, how-to, Notepad, Software | No Comments »
26th February 2015
A few days ago my smartd daemon (from the smartmontools package) notified me about a +1 increase in Current_Pending_Sector (197) and Offline_Uncorrectable (198) SMART attributes. The 2.5″ Fujitsu laptop hard-drive these appeared on is very old, and it also has been working 24/365 since a little over a year.
Running a short SMART self-test (sudo smartctl -t short /dev/sdc
) produced a read error at sector 1289:
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
1 Short offline Completed: read failure 80% 22339 1289
Looking at the partition table of /dev/sdc, we see that this sector is outside of the only RAID partition on the disk, which starts at sector 2048:
Device Boot Start End Blocks Id System
/dev/sdc1 2048 117209087 58605088 fd Lnx RAID auto
Read the rest of this entry »
Posted in *nix, how-to, Software | 1 Comment »
18th October 2014
Sygic, Waze, Osmand, Navfree, Navigator, or (Nokia’s) Here Navigation beta: which is a better offline navigation solution for your Android?
Read the rest of this entry »
Posted in Comparison, Software | No Comments »
25th August 2014
There are quite a lot of posts on how to do this, but my differs a tiny little bit, so I’m saving it for my own future reference, and also for the benefits of the wider audience.
I am updating a multisite Drupal 6 installation. To the best of my knowledge, the only difference for Drupal 7 is that instead of the site_offline D6 variable the maintenance_mode variable is used in D7.
On Debian stable and later, you can sudo aptitude install drush
and then just use it immediately after that.
Note: I recommend su webuser
(or sudo -s
followed by sudo -s -u webuser
) before you run any non-testing drush commands, where webuser is the user which owns your web-exposed files (e.g. Debian’s default is, I think, www-data). I’ve seen a lot of recommendations to run drush as a super-user, but that does not make sense, and may actually cause problems with file ownership.
One last thing before we start: if your drush seems to work fine but hangs when untarring modules – check this solution.
Read the rest of this entry »
Posted in *nix, Drupal, how-to, Notepad, PHP, Programming, Software, Web | 1 Comment »
25th August 2014
Drush is awesome, especially for updating multisite Drupal installations.
I had only started using it a few days ago, and I’ve immediately hit a problem, to which I did find a workaround.
Symptoms
- running
drush @sites pm-update
results in normal execution up to after answering ‘y[es]‘; then drush seems to hang indefinitely (haven’t waited beyond about 10 minutes, maybe it does produce an error after a long while); - running the same command with
--debug
shows that drush hangs when trying to untar the downloaded module.tar.gz archive; there are no errors/warnings, it just hangs with no CPU usage; - trying to untar any of the modules downloaded from drupal.org manually is also unsuccessful:
tar -xzvf module.tar.gz
seems to do nothing, it also hangs with zero CPU usage/time and no warnings/errors; - interestingly, if I create some
test.tar.gz
locally, tar
does happily extract that; - finally, running
strace tar -xzvf module.tar.gz
shows a number of unexpected lines, such as references to NSS and libnss files (I am only showing some of the lines of strace output, including the last line):
open(“/etc/nsswitch.conf”, O_RDONLY) = 4
read(4, “# /etc/nsswitch.conf\n#\n# Example”…, 4096) = 683
open(“/lib/x86_64-linux-gnu/libnss_nis.so.2″, O_RDONLY) = 4
open(“/lib/x86_64-linux-gnu/libnss_files.so.2″, O_RDONLY) = 4
open(“/etc/passwd”, O_RDONLY|O_CLOEXEC) = 4
open(“/usr/lib/x86_64-linux-gnu/libnss_mysql.so.2″, O_RDONLY) = 4
open(“/etc/group”, O_RDONLY|O_CLOEXEC) = 4
open(“/etc/libnss-mysql.cfg”, O_RDONLY) = -1 EACCES (Permission denied)
open(“/etc/libnss-mysql-root.cfg”, O_RDONLY) = -1 EACCES (Permission denied)
futex(0x7fd0816e8c48, FUTEX_WAIT_PRIVATE, 2, NULL
Read the rest of this entry »
Posted in *nix, Drupal, Notepad, Software | No Comments »