Tuesday, 27 August 2019

Setting up a second swap partition for Linux

In my last post I waxed lyrical about the merits of the Linux file system and how it is possible to have two swap partitions. Today I am setting up just that in my computer. It has an existing SSD with 100 GB available for swap, and due to an upgrade on the other computer, another 120 GB SSD has become available to install into it to add a second swap partition thereby more than doubling the swap space. This means the system should be able to edit very large Gimp files up to 50 GB whereas at the moment it can only handle ones up to about 20 GB because of all the other stuff I usually have running on it.

The first step to achieve this, having installed the disk and found it is in the system as /dev/sdc, is to make life easier and install GPartEd, the graphical partition editor (preferable to using command line in this instance). We can then use GPartEd to remove any existing partitions on the disk, and then allocate the entire space on it as a swap partition.

The next step is to run the mkswap command on our new partition (although it looks like GPartEd in fact already did this step)
mkswap /dev/sdc1

And then we can use the swapon command to activate it:
swapon /dev/sdc1

after which running swapon -s will list the swaps currently in use which we find lists both of them and also conveniently the KDE system load monitor widget tells me the swap is now 198 GiB in size (it was 87 GiB and the new SSD added 111 GiB).

To permanently add the second swap partition it needs to be put into /etc/fstab:
UUID=83c0e622-bcdc-41fd-a1ce-ec3f6c88bfcc none            swap    sw              0       0which is basically copying the previous swap file entry except for the UUID which we get from running blkid

Then I tested by two Gimp projects at the same time that are around 40 GB in total. Originally the first one would not even load in the system, while the second one would use the entire swap space. Loading both together only used less than half of the new swap space, making it possible to work on them without any concerns about the system running out of swap and crashing Gimp.
 


Linux has the best filesystem ever :)

I've been in the IT industry for something like 30 years (longer if I was to include the time in my secondary education) and in that time I have used a few operating systems, starting with Apple DOS 3.3, UCSD P-System, CP/M, Acorn MOS, Macintosh System 6/7, Netware, MS-DOS, Windows (since 3.1), macOS and Linux. Obviously with the evolution of computer hardware, operating systems have evolved with better functionality, so we can't really compare anything current with the old Apple ][ or BBC Micro Model B. However, Windows and Linux can be compared as they are both current, and Linux has definitely stood out as having the superior architecture to Windows, which reflects the former's well designed structure and its roots in the high end mainframe computing, compared to Windows' basic architecture derived from exclusively PC basis.

So what is important and relevant on the Linux filesystem structure are the following things:
  • Linux is engineered from the ground up to allow different parts of the core filesystem to be mapped to different drives or partitions. On Windows part of the core filesystem has to be on the same partition, C drive. Hacks to move, for example, the home drive to another partition, whilst provided for in a registry key setting, will actually break the service pack or version upgrade process, and therefore can only be used by technically savvy people who can manually engineer their own updates while backing up their home partition and migrating their data to the updated version. Since Windows 10 has frequent version upgrades, it is pretty well impossible for an end user to migrate the home drive.

    Linux, on the other hand, makes it very easy to map /home to a different partition. This is a real advantage when it comes to reinstalling, because you can keep the home partition intact and just reinstall the operating system and re-use your profile. That's another thing too - Windows will not allow you to re-use your existing profile when you reinstall. It will spew if you try to do that.

    I give my systems a SSD for OS install and put /home onto a RAID-1 hard disk array.
  • In Windows your paging or virtual memory goes into a file. In Linux, swap goes into a dedicated partition by default. I suppose you can tell Windows to use only a special partition for its swap file, but the default is to put it on C drive. The issue with using a file is disk fragmentation, and potentially running out of disk space to store it, further exacerbated by being unable to relocate your home folder (see above).
  • In Linux, you can spread your swap across more than one partition. This means I can simply expand my swap by adding another SSD into the system. That's about to happen in fact, so that I can have more virtual memory available for editing large Gimp projects. Windows has no such capability; the paging file all has to be on the same partition.
And there's a whole lot more after that, including the ability to support a whole pile of different disk formats; NTFS is pretty good but MS made it proprietary making it harder to exchange data between different types of computers.
  •  
  •  

Tuesday, 20 August 2019

Tamron AF 70-300 Di LD telephoto lens for Canon EF-M?

UPDATE: Since first writing this I discovered I can get the EF-EOS M adapter from Canon for $199. Although having to add this to the camera won't really help to make adding lenses to the EOS-M affordable, it would give me the option to use the telephoto lens from my existing EOS 600D with the M100. Assuming it actually is available at that price, it would have fallen sharply in cost from the original pricing which was around $500-600 for the adapter.

One of the obvious factors about owning an interchangeable lens camera is that we expect to be able to change lenses when we need something like a telephoto or wide angle instead of a standard lens. Since I own a Canon EOS M100 camera, I'd hope to be able to fit it with a tele zoom one day and be able to take photos at considerably greater distance than the lens that comes with it, which is a Canon 15-45 mm collapsible zoom. The Canon zoom lenses for the EF-M mount, however, are very expensive, priced around $600, which is almost as much as I paid for the camera itself, making it inevitable I'd want to take a look at a third party lens. 

Industry commentators have long remarked on Canon's extreme reluctance to threaten their profitable D-SLR market segment with mirrorless cameras, given the less than inspiring design and high pricing of the early EOS M models. Canon has insisted this is not the case and have brought out a much wider range of EOS M models with lower pricing in recent years. However, there is only a very limited range of extremely expensive Canon lenses and accessories produced for the EOS M models, compared to what is available for the EOS D-SLR in the standard EF mount. The cheapest Canon EF-M zoom lens costs around $550 retail. It's very clear that Canon is only prepared to position the EOS-M series as high-end compacts with deliberately strategisation to discourage end users from looking for an interchangeable lens camera at a cheaper price than their DSLR range.

Current pricing on the Tamron AF 70-300 Di LD lens is around $287 which is a very low price for a lens (the actual range of the zoom may be somewhat different as it will vary depending on the crop factor of the body it is fitted to, this is unclear at the time of writing). At that price it is made of plastic like the Canon kit lenses. There are a few other limitations that you would expect with a cheap lens like a front element that rotates (tricky with some types of filters that are angle dependent), slow autofocus, no image stabiliser, sticky zooming, blurry corners, some distortion, telephoto fringing / softness. The results will depend on the type of camera it is attached to, with a smaller APS-C sensor the edges of the lens are missed which gives better quality in many respects, but does not overcome the mechanical / design limitations.

The main issue is that I am finding it difficult to discover if this lens is actually available for the EOS M. If it should turn out that Canon has placed restrictive licensing on third party lenses for the M mount it will achieve their strategy of deliberately strangling the market for EOS M lenses. So far it looks like Tamron's only offering is the much more expensive 18-200mm F/3.5-6.3 Di Ⅲ VC, which whilst being a better quality lens, ends up costing practically the same as Canon's lenses. It must be apparent that Canon has placed severe restrictions on the production of affordable third party lenses for its EOS M cameras.