Brother Laser Printers – Slow Printing on Linux

I’ve had my Brother MFC-7840N print very slowly each time I update my Linux Mint system to the latest release and configure the printer. Instead of trying to hit my head against the wall repeatedly I’ve decided it’s time to put the solution on my blog to help me and hopefully you the next time it happens.

The Brother drivers from the Brother website involve a bit of messing around to get everything installed with specific pre-requisites for different Linux distributions and a few files to download and install, especially if you are enabling scanning too. That’s not too bad, as the documentation is reasonably straight forward to follow and, hey, it’s better than no support!

The problem arises when you go through the process and select one of the drivers already provided in the Linux Mint distribution. The drivers do work, but they are painfully slow.

Here is what you probably saw when adding the printer in CUPS.

Brother Printer Driver Selection - Slow

If you were like me, you decided that one of those drivers with the right model name looks pretty good and you click on that. However, what you should have done is scrolled further down until you saw the following driver:

brother_printer_driver_selection_fast

Once you have selected the above CUPS driver and finished the “adding a printer” process you should get something that looks like this in CUPS:

brother_mfc_7840N_fast_printing

I don’t know why there are two drivers that look the same, but I just selected the first driver and it worked like a charm.

I’ve seen plenty of posts on forums about slow printing with Brother printers, but none seemed to point to this rather simple answer. Hopefully you have found this useful and now have your printer zooming along at full speed. If this post has helped you, please drop a comment below and tell everyone else what printer model you have so they know the same process will work for them.



Autoimmune Illness Support Group – Singapore

The first meetup of the Autoimmune Illness Support Group was held at Novena, Singapore today. We had 3 people attend, which is not too bad an effort when there was no advertising of the group’s activity outside of the Meetup.com website!

It was great to be able to share our experiences and information about our conditions with each other. We also talked about how to grow the group and the types of activities that we could organise.

The three people who attended the meetup and their associated conditions:

  • Sherry Soon (livedoid vasculitis and Raynaud’s phenomena) – Organiser
  • Blair Layton (Hashimoto’s thyroiditis)
  • Estan Low (Central D. Insipidus & vitiligo)

The Initial goal for the group is to provide a forum for people to share their stories and understand how others with autoimmune conditions manage their illness(es). Once the group has grown its membership we would like to increase awareness of autoimmune conditions in Singapore and engage health professionals to discuss the latest information on autoimmune conditions.

The Singapore Autoimmune Illness Support Group will hold its next meetup in May. If you are interested in joining please signup at the Meetup.com website and tell us a bit about yourself. We hope you can join our event and benefit from sharing information with other members in the group.



Adding Swap Space to an AWS EC2 Micro Instance

I recently moved some of the WordPress sites on an EC2 m1.small instance in Amazon Web Services (AWS) Singapore data centre to a m1.micro instance in the new Sydney data centre. Unfortunately the new t1.micro instance has run out of memory a couple of times, resulting in the websites being unavailable. After I was notified I had to find out what process/service was killed and restart it.

To stop this happening I could either upgrade to a m1.small instance with 1.7 GiB instead of the 613 MiB, or I could add swap space to the existing server.

I decided to try and save some money by adding swap space to my existing server. There are two main options to do this:

  1. Create an EBS volume and dedicate it to swap space.
  2. Create a swap file on the existing file system (also an EBS volume if you are using an EBS based AMI).

If you decide to add an EBS volume then the smallest size is 1 GB, for which you will have to pay the prevailing monthly rate in the AWS region of your instance. Make sure you put the EBS volume in the same availability zone as your instance or you will not be able to attach it! You will also be charged the I/O costs as data is written to and from the swap space.

With a swap file you only get charged the I/O costs, since you are already paying for the empty space. I still had quite a bit of space available and thought that 512 MB of swap space would be sufficient, so I chose this method.

I’ll describe what I did first and then outline the option using a dedicated EBS volume.

Adding a Swap File

First of I needed to decide where to put the swap file and what to call it. I chose /mnt/swap_512.swap and created it with the following command:

dd if=/dev/zero of=/mnt/swap_512.swap bs=1M count=512

Next I needed to let Linux prepare the file for use as a swap file by using the mkswap command:

mkswap /mnt/swap_512.swap

Finally, I activated the swap file with the swapon command:

swapon /mnt/swap_512.swap

You can check to see if your swap file is being used with top or free. Here is the output from free on my machine:

             total       used       free     shared    buffers     cached
Mem:        615664     592288      23376          0       8548     144448
-/+ buffers/cache:     439292     176372
Swap:       524284        348     523936

You should edit your /etc/fstab file to add the swap file information so that it is available if you restart the instance. This is what my fstab looks like on my t1.micro instance:

LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0
/dev/sdf    /u01        ext4    defaults        0   0
/mnt/swap_512.swap swap swap    defaults        0   0

Note that I have another EBS volume attached for backup purposes that is mounted at /u01.

Adding a Dedicated EBS Volume for Swap Space

First you’ll need to create a new EBS volume in the same region and availability zone as your t1.micro instance. The smallest size is 1GB, which should be more than enough for your swap space.

Once the volume is available you need to attach it to your instance and then note the device so that you can refer to it later. For example, my backup volume is /dev/xvdf with a link to that called /dev/sdf.

There is no need to create the file like the previous example, so you can go straight to preparing the device for use as swap space with the following command:

mkswap -f /dev/xvdf

The -f will force the use of the whole disk, which is what you want.

You can then activate the swap space with:

swapon /dev/xvdf

Again you should edit your /etc/fstab to make sure the swap space is available upon a reboot. Just use my example above, replacing the /mnt/swap_512.swap with /dev/xvdf or your assigned device.

Conclusion

Adding swap space to your AWS EC2 micro instance is quite a simple process that can bring much needed stability (random process kills to keep the machine running are not fun). It can also give you time to catch a memory hogging process before it brings the machine to a halt. However, you do need to monitor your swap usage. If you find that your system is constantly reading and writing to swap then your system’s response time can slow down dramatically. In this case you are truly memory bound and need to upgrade to an m1.small instance.