Skip to main content

Compress log files efficiently with 7zip

 7-zip is a popular compression tool and  famous for high compression ratio.

But unfortunately, there is no description in the man pages about switching the compression algorithm to PPMd . Actually, PPMd provides very high compression ratio with lower CPU power consumption with a text data, and I would like to show its efficiency.

Here is an example. Below is a comparison of size and CPU time between variety of  compression methods .

   command       size      time   
7z a -tzip -mx=9    3699 bytes   0m0.410s
7z a -tgzip -mx=9    3610 bytes   0m0.411s
7z a -tbzip2 -mx=9    3363 bytes    0m0.608s
7z a -m0=lzma -mx=9    3406  bytes   0m0.109s
7z a -m0=PPMd -mx=9    2699 bytes   0m0.058s

The original file is a 6795 byte text file. As you can see, efficiency of PPMd is outstanding!

PPMd helps me a lot to compact log files.

Comments

Popular posts from this blog

Some adjustment to run some daemon services within LXC container

 I built and am running a mail server, using dovecot for IMAP4 server and Power DNS (pdns) for DNS authoritative server, and memcached for back-end service for some mail filter. I also use LXC for staging environment to test my mail server, but running those services is not straight forward. My understanding is that it is because some security features of systemd using Linux kernel namespace function conflict with the use of namespace in LXC container. So, if you want to run memcached, dovecot, and pdns via systemd within LXC container, you have to disable some security features of systemd by configuration. My additional configuration to systemd is as follows: root@myhost:/# cat /etc/systemd/system/memcached.service.d/99-ns.conf [Service] ProtectSystem = no ProtectHome = no PrivateDevices = no PrivateTmp = no cat /etc/systemd/system/dovecot.service.d/99-ns.conf [Service] ProtectSystem = no PrivateDevices = no PrivateTmp = no root@myhost:/# grep -v '#' /etc/systemd/system/pdns.s...

Configuring Network Manager for PPPoE connection

When I'm home, I use fiber-optic line with a dedicated old small router (YAMAHA RT107e) for access to the Internet. But I recently became anxious about the router. If it fails, how can I survive until I get another one? So, I tried to connect my Debian desktop PC to the fiber-optic line without the router. The PC have to talk to the other side of the line with PPPoE but I did not know how. In my PC, the Network Manager manages network configuration. So, I had to configure the Network Manager to utilize the pppoe like : nmcli connection add ifname eth0 connection.type pppoe username USERNAME password PASSWORD

Debian wheezy and a circular touch pad settings

It's been a long time since my last post. Recently, I bought a secondhand Panasonic T7 laptop PC. It was as much as seven thousand yen (about 76 USD), and I am pleasant for the price. I installed Debian 7.1 (wheezy) to the PC and set up Xfce desktop environment. Most of the things went well, but the X-Window system didn't recognize automatically that its touch pad device was circle and able to sense tapping operations. I was disappointed a while, but managed to write additional configurations for the X server with a help of the man page of Synaptics touch pad input driver. For reminder,  here it is: $ cat /etc/X11/xorg.conf Section "InputClass"     Identifier  "MyTouchPad"     MatchDriver      "synaptics"     Option        "TapButton1" "1"     Option        "CircularPad" "true"     Option  ...