Linux process scheduling

I read an informative and interesting article today at Opensource.com about process scheduling in Linux, CFS: Completely fair process scheduling in Linux. It goes into some detail about the Linux Completely Fair Scheduler which has been around now for a bit over a decade.

Understanding how the Linux kernel schedules tasks for CPU time is an important part of our knowledge as SysAdmins. It enables us to understand why programs might be unresponsive and how to deal with that. Dr. Marty Kalin, the author, has covered this in an understandable way that helped me to understand this important kernel task.

Don’t miss this excellent article.

Server repairs completed

It has been a challenging few days due to a series of hardware failures. I had two systems that were complete failures two with minor problems and one that might be easily fixable. But the server is back up and running so email and my web site are functional again.

It all started last week when my old server crashed due to an intermittently failing hard drive. I managed to get that back up and running temporarily with a bit of luck and a complete BIOS reset. I was able to keep it running long enough to choose a spare host and move DHCP, DNS, NTP, and firewall services to it.

While I was working to move additional services to my new server, the motherboard on my wife’s computer failed so I took some time to replace that. Of course the motherboard on that system was so old that the only option was to go with a new motherboard, CPU, memory, and a power supply that could deal with an Intel i7 1151 hexa-core processor.

After fixing my wife’s system and getting a good bit of work done to move web services and email to my new server, the old one died permanently.

It took me a couple days to get web and email up and running on the new server because I was moving from CentOS 6 to Fedora 29 which included updates to both Sendmail and Apache. It took a bit of research but I was able to determine that the fix for each were minor changes to obscure configurations for the newer versions of those services.

Both web and email are complex installations. My web site uses Apache web server and WordPress with a MySQL (MariaDB) back-end database. For email I use Sendmail with SpamAssassin and MimeDefang for spam filtering. The good news is that a simple restore from backups of the data and everything was up and running – you do make backups, don’t you?

I apologize if you tried to send me email or visit one of my web sites and were unable to get through. If you send me email between January 21 and today and did not receive an expected reply, please let me know and I will respond as soon as possible.

Thanks.

Server upgrade in the works

After some work to determine the extent of my server problems, I have decided that it is time to go for a complete upgrade. I have another Fedora Linux system that I have been using for several months that is the prime candidate as the target for this move.

Over the next few days I will be moving services such as DHCP and DNS from the old server to the new. After the basic service moves, I will move web and email services to the new server.

I intend to go slowly and ensure that each service is working properly on the new server before working on the next.

There will be outages of various lengths during this process although I am hoping that only one service at a time will be affected. Where possible I will try to post a notification here in advance of outages. I may not be able to do that in all cases but I will try.

Again, thanks for your patience.

Web Site Outages Today

Due to a failing power supply, my web and email host has been repeatedly rebooting every few minutes this morning. This caused intermittent web site outages and would have made accessing this web site quite frustrating. I apologize for the inconvenience.

I was able to determine that it was the power supply quite easily because it was very hot to the touch. After replacing the power supply the server is now running butu there is still a problem.

There appears to be an issue with the motherboard in which the system dies and won’t restart when the case is placed in an upright position. This is probably cause by a short on the motherboard that is created when the case is upright and the weight of the cables is causing different force vectors on the main board.

I hope to do some additional testing to determine the true source of the problem and repair it. This might require purchase and installation of a new motherboard.

Expect more hopefully short outages today and possibly tomorrow as well.

Thanks for your patience.

Why I Hate Windoze

Well – one reason anyway.

I use a virtual Machine (VM) with Windows 10 installed for research on a new book I am writing. I started that VM this afternoon to do some testing and took a few screen shots to include in that book. After I finished up with that, I was going to shut down the VM but then this – the Blue Screen of Updates.

Windoze Blue Screen of Updates

This has been going on for hours, now, despite the fact that this VM has assigned to it 8 CPUs (4 Cores) of the 32 CPUs (16 cores) and about 24GB of RAM of the 64GB that I have on the physical host. Here is what that looks like in htop.

PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
22254 dboth 20 0 26.3G 23.7G 23.5G S 13.1 37.9 4h32:53 │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 08219ab 22422 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 1:41.72 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22304 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.16 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22302 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 1:52.65 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22301 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.10 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22300 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.02 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22299 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.00 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22298 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:33.08 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22297 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.73 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22296 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 1:54.59 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22295 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 1:43.01 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22294 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.32 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22293 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.39 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22292 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.00 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22291 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.00 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22290 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:01.40 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22289 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:30.35 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22288 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.00 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22287 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 0:00.00 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22285 dboth 20 0 26.3G 23.7G 23.5G S 2.0 37.9 29:35.40 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22284 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 29:38.65 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22283 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 49:19.77 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22282 dboth 20 0 26.3G 23.7G 23.5G S 0.7 37.9 28:13.68 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22281 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 25:38.74 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22280 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 22:36.03 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22279 dboth 20 0 26.3G 23.7G 23.5G S 0.0 37.9 29:00.56 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821 22278 dboth 20 0 26.3G 23.7G 23.5G S 6.6 37.9 47:30.30 │ │ ├─ /usr/lib/virtualbox/VirtualBoxVM --comment Win10 --startvm 0821e>

These lines copied from htop show that the Win10 VM has been running for hours and taking over 26GB of RAM. This includes what I assigned plus the VirtualBox overhead. But that is huge in terms of both RAM and CPU time. Updates to a Linux system never, ever take that much system resource or real-world time. 

Meanwhile, the virtual machine is of no use to me as I cannot do anything on it until the updates and multiple reboots are completed. Not to mention the fact that I had no choice about when this happened. It just started and did not give me an opportunity to opt-out.

On Linux I can work while the updates are being installed, and I do not have to reboot until I am ready. Only one reboot is ever needed to install updates and I can choose when I want the updates to be installed and then, separately, when I want to reboot my Linux computer.

To make this even more disturbing, after it finally rebooted for the umptieth time — or so I thought — I logged in and it had the audacity to display in the screen, “Hi. We have some updates to install,” or something to that effect. 

Some of my friends wonder why I don’t use Windows. This is one reason. 

Fun with ASCII art on the Linux command line

This really brings back memories of when I worked night shift on an IBM 1401 and we used to print ASCII art on the IBM 1403 printer when we had nothing else to do.

This fun little utility, boxes, can draw various forms of boxes around text at the Linux command line. Jason Baker, my friend at Opensource.com found this and made it the subject of the first of 24 articles he will be publishing this month.

                  .-"""-.
                 / .===. \
                 \/ 6 6 \/
                 ( \___/ )
  ___________ooo__\_____/________________
 /                                       \
| OK, Jason, how did I not know about the |
| boxes utility before?!                  |
 \_________________________ooo___________/
                  |  |  |
                  |_ | _|
                  |  |  |
                  |__|__|
                  /-'Y'-\
                 (__/ \__)

I look forward to Jason’s next Linux toy.

 

The eBook version of The Linux Philosophy for SysAdmins on sale for $7

 

The eBook version of my book is currently on sale for $7.00 at Apress from now through November 26, 2018. Click on the image at left or here to go directly to My book’s page at Apress where you can purchase it. You can also go here to see all of the eBooks that Apress has on sale.

 

About The Linux Philosophy for SysAdmins

The Linux Philosophy for System Administrators is not about learning new commands, processes, or procedures. Rather it is about becoming a better SysAdmin through understanding the power of Linux as a function of the philosophies that built it. SysAdmins will learn how to unleash that power with the knowledge enabled by a philosophical approach that targets their unique needs.

This book uses a relatively few common Linux commands to illustrate practical, usable aspects of the philosophy. Readers will learn a philosophical approach to system administration that will unlock the power of the knowledge they already have. This book will enable SysAdmins and others to more fully understand and access the vast power of the command line using commands and tools that they already know and use.

This book takes place on the Linux command line, but it is not about the commands themselves. The commands are only the tools through which the beauty of the underlying structure of Linux is revealed. This book will help you learn how to do that using the philosophy contained in its pages.

Book availability update

My book The Linux Philosophy for SysAdmins is now available in hardcopy (softcover) at Amazon.

Please note that for a couple days Amazon was fulfilling this via a third party storefront on Amazon. Amazon now has my book in stock and it is currently sold and fulfilled directly through Amazon.

I would appreciate any reviews you post on Amazon, good or bad. I am writing two new books and any feedback will be appreciated so that my next books can be even better. If you wish to contact me directly, please do so.

LinuxGeek46 {at} both {.} org

Thanks.

Book hardcopy available on Amazon

My book The Linux Philosophy for SysAdmins is now available in hardcopy (softcover) at Amazon.

Please note that Amazon is fulfilling this via a third party, Books etc._, a storefront on Amazon. I would appreciate your comments regarding your experience with them.

LinuxGeek46 {at} both {.} org

Thanks.

Meet the author(s) at ATO

On Monday, October 22, from 12:45 PM – 1:15 PM, my publisher, Apress, will hold a “meet the authors” session at All Things Open in Raleigh, NC. Several authors of popular Apress books, including myself, will be available for questions and discussion. We will also be happy to sign books for you.

Authors present at this session will be:

  • Mary Thengvall
  • Azat Mardan
  • Preston So
  • David Both
  • Gordon Haff
  • Waldemar Quevedo

We look forward to meeting you.

My Ohio LinuxFest presentation

I am scheduled to present my talk, “Be the Lazy SysAdmin,” at the Ohio LinuxFest Saturday, October 13 (tomorrow as I write this) at 10AM in the Franklin A room. Due to circumstances beyond my control I am unable to be there in Columbus at OLF.

However, my presentation will still take place. I have arranged to present my talk remotely from my home in Raleigh, NC. This morning we tested our remote solution, right from Franklin A, and everything seems to be working perfectly. Of course things never work perfectly on the day of, so please bear with us if we run into any snags.

I am experiencing much angst at not being able to be there in person because I am unable to interact with you all as freely as I would like. We will have Scott Merrill in the room to help by passing questions to me and letting me know when you look bored or perplexed. ;-)

I hope you will understand my distress at not being there to meet with you face to face. I promise to do my best to make this the session you were expecting.

Thank you!

Yet another book contract

I have just signed with Apress for third book about Linux. With two books now in the pipeline it looks like I will be busy for a while. I do not have definitive dates when these books will be on the shelf but my schedule calls for the writing to be completed by Summer of 2019 for the first and Autumn of 2019 for the second. These books constitute a two-book series.

As soon as I can post more information I will.

New book in the works

This morning I signed a contract to write another book for Apress. This book will also be about Linux but it will be different from my first book, The Linux Philosophy for SysAdmins. I cannot divulge more about it at this time, but I am very excited about writing another book for Apress. I will post more information as soon as I am able.

Thanks!

Your computer isn’t broken – it just needs Linux

Longevity – an interesting word. I use it here to help clarify some of the statements that I hear many people make. These statements are usually along the lines of, “Linux can extend the life of existing hardware,” or “Keep old hardware out of landfills or unmonitored recycling facilities.”

The idea is that you can use your old computer longer and that by doing that you lengthen the useful life of the computer and decrease the number of computers you need to purchase in your lifetime. This both reduces demand for new computers and reduces the number of old computers being discarded.

This is all true.

Keep the hardware relevant

For one example, I have an old Lenovo ThinkPad W500 that I purchased in May of 2006. It is old, and clunky, and heavy compared to many of today’s laptops, but I like it a lot and it is still my only laptop. I take it with me on most trips and use it for training. It has enough power in its Intel Core 2 Duo 2.8GHz processor, 8GB of RAM, and 300GB hard drive to support a couple virtual machines and be the router and firewall between a classroom network and the Internet, to connect to a projector to display my slides, and to use to demonstrate the use of Linux commands. I currently use Fedora 28 on my laptop, the very latest. That is pretty amazing considering that this laptop, that I affectionately call vgr, is a bit over 12 years old as I write this in September of 2018.

Linux can most definitely keep old hardware useful. I have several old desktop workstations that are still useful with Linux on them. Although none are as old as vgr, I have at least one workstation with an Intel motherboard from 2008, one from 2010, at least three from 2012.

Resist malware

Another reason that I can keep old hardware running longer is that Linux is very resistant to malware infections. It is not completely immune to malware but none of my systems have ever been infected. Even my laptop, which connects to all kinds of wired and wireless networks that I do not control, has never been infected.

Without the massive malware infections that cause most peoples’ computers to slow to an unbearable crawl, my Linux systems – all of them – keep running at top speed. It is this constant slowdown, even after many expensive “cleanings” at the big box stores or the strip mall computer stores, that causes most people to think that their computers are old and useless. So they throw them away and buy another.

So if Linux can keep my 12 year old laptop and other old systems running smoothly, it can surely keep many others running as well. Including yours.

Linux turns 27 today

Linux is 27 years old today. Happy birthday Linux and thank you Linus Torvalds for giving us a real operating system to use on our computers. I have used Linux for over 20 years and I cannot imagine using anything else on my computers.

I have never used Windows as a primary operating system on any of my many computers. I started with DOS, then went to OS/2, and then to Linux. To be completely honest I do have one VM with Windows on it that I use for research for articles and books. But I keep it tightly caged in that VM. ;-)