Early swap usage
Hello.
I'm using Kubuntu 19.10 and noticed that swap was used very early after starting the desktop, even if there's still RAM available (4Gb RAM, KDE Plasma Desktop). How can I troubleshoot what's causing this early use of swap ? isn't swap supposed to be used only if RAM is full ? can I do something about it ? |
What does top or htop tell you about memory usage?
|
Please see imgur album here : https://imgur.com/a/ba7FR6j
|
Quote:
Swap is a resource available to the memory management system to manage and balance as it sees fit. Many man years of effort by a bunch of very smart people have gone into the code. Go find a real problem to worry about. If it really worries you, issue a swapoff/swapon. |
Ah, this is good to know. The real problem that worries me is the system being slow after some time. I have linked this with swap usage because many times when system becomes unresponsive, I see one or two processes in "disk sleep" state, which means they are waiting for data from disk (could writes also be blocking ? dunno), which is why I thought maybe they are reading from the swap file (since the monitoring tools show swap usage). But after reading your post I assume swap is not an indicator of poor system health.
|
www.linuxatemyram.com will explain some details.
|
Code:
cat /proc/sys/vm/swappiness https://wiki.archlinux.org/index.php/Swap#Swappiness Look at your distros docs. |
Quote:
Swap is used always, despite from physical memory in use. Kernel memory paging put on swap space not often used data despite if ram is full or not. You aren't anyway using the lightest distro out here, ubuntu and derivatives, since introduction of snapd daemon, waste a bunch of resources doubling already present services and added with the most resources hungry desktop environment. You have not only to consider the used memory but also the cached memory only the difference between the total memory minus memory reserved for video card+used memory+cached memory is really "in hand" to system i.e. in my system with base 1GB ram right now really free memory is 376MB and it doesn't anyway swap Quote:
Eye candies have an high memory price and an high price in system responsiveness too. I can only suggest you to check with a lighter live i.e. MX Linux which runs smoothly live on my other machine with 2GB ram without swapping. Let us know. |
Quote:
Quote:
Quote:
Code:
echo 10 > /proc/sys/vm/swappiness Code:
sysctl -a | grep swap my light machine is like that Code:
sysctl -a | grep swap And my main machine with 6G of ram Code:
vm.swappiness = 0 So probably kubuntu is too heavy and needs swap. You can try 0 setting, but in my stressed machine 10 was the right choice. I think KDE is a disaster for memory. Only XFCE here for many years. I never worked with KDE the last 10 years. Quote:
|
Quote:
Giving also a link to a comparison which demonstrates this. Quote:
Now I use Icewm on my daily driver and JWM for my rescue system installed on a 16GB usb key built upon Devuan minimal live and it run witn fancy transparency too with less than 100MB ram. I think that reinventing the wheel (Pantheon, Cinammon aso) is a waste of time, and not so smart, when you could instead help to improve what already exists and works. It seems, too, that the Big Corps. take over of GNU/Linux keep using but formerly getting rid of GNU is also a try to increase hardware requirements hoping to help manufacturers to sell not needed new hardware cause sales are plunging year after year. My machine with more ram is an eeePC with 2GB ram and with the right OS it works flawlessly also with a 32bit Atom Z520 and I don't use only a browser to surf the net as the large majority do. My daily driver is an eeePC with 1GB ram and an Atom N455 64bit and my media center used also to watch TV with a DVB/T-T2 usb decoder and watch DVD's is a 2006 IBM T41 32bit 1,4GHZ CPU with 1,5GB ram coupled with a BenQ 32" display. The will to learn let you save a bunch of money so you haven't to work 24/7 cause money is never enough and in the spare time you can help others, free of charge, to acquire knowledge so they won't be forced to do the beta tester for easy big corps Linux like Canonical IBM\RedHat Suse letting them make money on users' free of charge work. Quote:
swapoff -a will disable every swap space found and mounted on boot but I think we were talking about normal use of an out of the box distro. But take care that this is no longer true for Ubuntu since 17.04 cause a big corp (Canonical) has decided to replace the swap partition with a swap file resembling Windows. That's why I avoid fake free software coming from Big Corps and also their, even if community developed (i.e. Mint) derivatives. Sorry for the, sometimes, OT but it seems that a majority confuse a kernel (Linux is only a kernel useless by itself) with an OS so a little history is sometimes needed. If you don't like to read cause history is boring... watch it! |
As others have said, it's probably KDE. KDE is probably one of the resource hungry of user interfaces. I used to use way back, but haven't used it in many many years. I say change your GUI or if you want to keep using it, I'd recommend upgrading your RAM.
|
Quote:
OP is maybe a candidate to switch to KDE neon. |
Quote:
Anyway I've downloaded the latest current (development) Slackware on which is possible to install KDE Plasma 5 so we will see if it's really a KDE trouble or Big Corps Linux without GNU, as I suspect, is defective by design developed with addition of useless daemons and init system injected with binary to follow the road opened by #M$ to bootlick hardware manufacturers to convince them to install their OS's cause they will ensure them a quicker, not needed by normal user, hardware turnover and consequently new hardware sales they won't never had. i.e. Dell supplies PC with Ubuntu Brought to you by Canonical with Headquarter in the Isle of Man to pay less taxes. I prefer the true GNU/Linux phylosophy which was recycle instead to toss thanks to GNU/Linux also cause toss still functioning hardware to me it's a crime against environment and it worsen #ClimateChange. Today I will do some tries. |
Quote:
You, and me, are right. A 4GB machine is nowadays too weak for Big Corps. Linux maybe they did agreement with hardware vendors, as I suspect, to help them in selling not needed new hardware cause sales are plunging. A crazy friend give me some days ago a 4 years old 17" HP Laptop with a Core I5 4210U 8GB ram and a 256GB SDD (I keep it as last resort cause I need portability that's why I use old netbooks). On it he installed Makulu Linux Core derived from Debian so without snapd and all other Ubuntu candies and anyway the bare system as soon as switched on has a memory consumption of 586MB. On the same machine I had run live AUSTRUMI a Slackware derivative without systemd and Canonical eye candies it runs with 184MB. It's impossibile to find Kubuntu system requirement and this is not so polite but looking at standard Ubuntu (with Gnome 3) requirements.... Ubuntu Desktop System Requirements ychaouche is forced to upgrade the ram or switch to a true GNU/Linux distro not bloated with useless services and which wastes ram to load more than once and maybe more than twice the same library only in different version to install with a click statically linked executable. Sad to say but this is the truth, a machine with 4GB ram which I could use still for years for a newbie or for who follows the herd is an ewaste. Hope this helped. :( I'm here to help eventually in choosing and using other to avoid to give away money for a not needed memory upgrade or ever worse to toss a still perfect functioning PC only cause a Big Corp has decided so. Btw. @ychaouche if you want a KDE out of the box suitable for newcomers give a spin to PCLinuxOS It has KDE but a minimum memory requirement which is an half of Ubuntu Desktop 2GB minimum instead of 4GB Let us know! |
I found the information concerning swap in this website helpful in what is going on with swap.
https://www.linuxatemyram.com/play.html |
Quote:
But this doesn't change the things. Nowadays a 4GB ram machine is too weak on memory for Kubuntu & also for Ubuntu brought to you by Canonical a Big Corp owned by a billionaire. Better luck with Xubuntu & Lubuntu but they don't have KDE. For a newcomer with a 4GB ram machine the only feasible way to have KDE is to install PCLinuxOS KDE Edition Always if they don't have a Broadcom BCM43142 wireless chip cause at least in the latest PCLinuxOS OpenBox Community Edition it doesn't work. |
Quote:
|
Quote:
That is one thing I do love about Linux, it works great on older hardware. With just a little bit of digging and research, you can find the perfect distro that will perform excellent on your machine. I'm testing out a distro (Peppermint) on an old Pentium 4 machine with 2GB of RAM. It's running right now and only using 270MB of RAM and has a nice GUI. I've got a quad core laptop too with 4GB of RAM running Linux Mint which is light on resources as well. I would rather my RAM be utilized for my programs moreso than running the GUI. I often think that if I had a lot of RAM, I'd still try to be lightweight with it. Really, IMO, one of the bigger memory killers is web browsing...go to those webpages with all their animations, graphics, etc. :eek: |
Quote:
|
Quote:
Quote:
|
Quote:
|
1 Attachment(s)
Quote:
With such ram on a distro without spyware and useless system you can run also xfce with standalone apps. This is not XFCE but some app and the system... 92MB ram eye candies included. |
Quote:
It's not, only due to KDE, also the base sucks. With the same DE... 2GB bare minimum memory required. They are not wizard. Maybe less garbage running? Gnome is "lighter"? Well, 4GB are the bare minimum and it's neither my fault Canonical official specs |
KDE and Gnome are the "biggest" ones.
https://www.lifewire.com/best-linux-...nments-4120912 |
Quote:
And numbers don't lie as humans do. Ubuntu is heavy by itself (4GB minimum required for the version with the "lighter" Gnome shell if more than 700MB only for the DE are "few") added with KDE is out of scope for 4GB machine. |
Quote:
Never tried JWM, but I did try IceWM back when I was using Puppy Linux. It did well. Most GUIs I have been fine with, but XFCE is one I just never really cared for. |
Quote:
|
Quote:
Quote:
antiX instead uses IceWM as standard desktop manager but clicking F1 at the login screen you can use JWM, Fluxbox or HerbstluftWM (something like Monad, i3 aso keyboard driven). XFCE is the joker of desktop manager. With it you can easily resemble a windows like user interface or a Mac like one with little tweaking. |
Quote:
KDE Plasma is the fattest DE out there. |
Quote:
|
Quote:
KDE is the heaviest since 2002 when I started my adventure using only GNU/Linux without dual boot. To hope to have responsiveness with KDE on a 4GB machine, you are right in this, it's needed another GNU/Linux. Fortunately ...buntu != GNU/Linux It's plenty of lighter choices on which run KDE avoiding also third parties distros based on ...buntu family. |
Quote:
Quote:
Here's some more current data, from 4 old multiboot PCs equipped with DDR2 SIMMs totalling 2048 GiB. None had any attempt made to equalize any of the others. Except for bringing the 4 Tumbleweeds current, I just collected what was available from what was already installed. Each X startup was immediately post-boot running only Konsole in order to run inxi -SI. I made no attempt to discover what post-updates startup processes may have been running that may have terminated and freed up RAM if given enough time. I tried to include more distros, but on these oldsters with 2 GiB RAM, the pickings were slim. Mageia 7s and Fedora 31s on these 4 all have broken DMs and/or no KDE, and the Ubuntus are all 16.04 and/or only IcwWM and TDE. All Debians are only IceWM and TDE. I have more with only 2 GiB RAM, but only with TDE or KDE3 and IceWM and/or not current enough to be relevant. Compositing is disabled on all, as was any sort of user data indexing. All filesystems are EXT4. The main two things shown following are:
Code:
System: Host: g5eas Kernel: 4.19.0-6-amd64 x86_64 bits: 64 Console: tty 3 Distro: Debian GNU/Linux 10 (buster) |
Quote:
It seems that you are a KDE developer. You completely miss what already stated in the previous posts. I summarise. To answer to the question which starts the post: Kubuntu is not suitable for 4GB machine it's needed a memory upgrade or to choose a lighter distro out of the ...buntu and derivatives family i.e. PCLinuxOS KDE (minimum required 2GB ram) cause, maybe due to the fact that Canonical supplies its OS to Dell they are interested in helping Dell to increase sales to demonstrate the benefits given by the partnership. Anyway also with lighter distro to avoid to have a crappy system which continuosly swap also with swappiness 0 on 2GB machines you have also to avoid spyware bloated browsers like Chrome and Chromium cause with a single page opened Chrome launches 4 processes and has a 400MB memory consumption by itself. As you see I don't charge only KDE cause the trouble has more than one cause. I'm agnostic not a fanboy of anything. |
I've been comparing the numbers between Xfce and KDE4/5 for years, i.e., ever since that disaster known as KDE-4.0. I had been a big fan of KDE up until that point.
I don't have the numbers handy and would be lucky to find them if I looked as I would jot them down on a yellow pad. However, on the same hardware and making an effort to be running the same applications, over the last few years KDE and Xfce have been very close. IIRC, last time I did a comparison, KDE was running fewer processes, but was using 80 megs more memory than Xfce. These days that is pretty close. I have always wondered why KDE reports, via gKrellm, two users and Xfce only reports one user. All on Slackware64, BTW. Edit in: The GPU also run six to ten+ degrees warmer in KDE vs. Xfce. |
Quote:
|
Dedoimedo says! :study:
"The distro was robust and fast. No problems. Plus, it purrs quite nicely. On idle, the memory is usage is about 500 MB...CPU was mighty quiet, though, barely ticking above zero when there's little to no desktop activity." On battery life... "... this would mean 4.5 hours, in line with previous Plasma findings, or at the very least more than 4 hours easily. Quite impressive." From review of Kubuntu 19.10 with Plasma 5.16.5... https://www.dedoimedo.com/computers/kubuntu-ermine.html And his update to Plasma 5.17... https://www.dedoimedo.com/computers/...17-review.html Plasma of 2020 is not heavy. Only nice! :D |
4 Attachment(s)
Quote:
WoW! Do you turn on the pc only to look how is nice KDE Plasma? Me not, to me 500MB only to run a bare system are resources thrown in the loo. With the same ram I use a pc. I couldn't download a 2GB monster iso but I discovered on Distrowatch the announcement of Q4OS always with Plasma 5 but with Debian Buster as base OS and the iso was only 800MB so I've downloaded and dd-ed it to check on my daily driver. With a suckless base (Debian instead of Ubuntu) you save still more than 100MB ram. But... emerged that KDE Plasma 5 seems completely inefficent and causes high memory consumption peaks which makes the systems damn sluggish i.e. more than 5 seconds on an Atom N455 1,6GHz 64Bit CPU only to open a terminal. Maybe who started the thread was running other (maybe a browser) too and this caused the swap usage during the peaks generated by KDE. To make you happy I post the htop of Q4OS and antiX iceWM both done on the same machine with the same programs (a terminal and xpaint) opened and a screenshot with memory footprint of the OS with KDE running the aforementioned 2 apps. If you like to waste resources... up to you. Update Jan. 6th 2020 Maybe I was wrong. The 100MB saved aren't due to the base but... Yesterday I tried Artix Linux LxQt on the 2015 UEFI HP laptop and on my daily driver an Asus eeePC with an Atom N455 and bios. Booting the same live dd.ed on the same usb card the memory consumption of the fresh started system on idle on the UEFI HP (UEFI boot) is 275MB, instead on the eeePC (Bios boot) the memory used is exactly 175MB 100MB less. It seems that Dedomeido has booted Kubuntu as UEFI Boot on an UEFI machine and this also demonstrates that Intel sucking "better" technology serves only to craftly increase system requirements so not IT savvy will run to the shop to buy a new, not really needed pc. |
This has been a very entertaining and informative debate, but as a really old guy who has been involved in the use of desktop computers since the very earliest days (1970), I will make a prediction.
But before I do let me say that my observations of humanity both in person and from reading history tells me that greed (and some say evil) will ALWAYS win against goodwill and altruism because evil is willing to wait and never, never gives up. After all England still has a king! In the US, banks still print the money and then "lend" it to the treasury (despite Andrew Jackson winning briefly). That's because greed is a primordial instinct that is in all of us to a greater or lesser degree. Humans are just as prone to instinctive behaviour as any other animal and don't realize that is why they do the things they do. EXAMPLE: Even though Microsoft has ALWAYS had the worst wordprocessor imaginable, they won. The strategy at Microsoft was to just keep chipping away at its competitors year after year, bribe reviewers, force manufacturers to include their software, and otherwise do anything other than write a good word processor. The other part of the equation is that the masses become dumber every year (people should watch Idiocracy) :-)) and want convenience irrespective how much that convenience harms them. My wife is a perfect example. I had to isolate her machine from the network because she wants all that stuff (facebook, twitter, Netflix, gmail, bouncing baby videos) that seriously compromise the security of her computer. I am constantly having to clean it. She uses the cloud even though that makes absolutely no sense for a home user (or anyone else, in my opinion). Now whoever owns the cloud she uses also owns her data. She doesn't care because for her it is so convenient. If you don't believe that they own your data then carefully read every word of the 30 pages of the Microsoft, Dropbox and Apple and Google agreements. It says they can use your data anyway they want (in legalese) without your permission. This level of convenience seeking falls into the hands of the greedy corporations. By the way, my wife graduated summa cum laude in engineering so she is not stupid. Its simply a choice. And now Microsoft is part of the Linux foundation! Their plans are insidious, but people have been duped, and are running around saying "look, Microsoft is embracing open source, they are no longer evil." Nothing about Microsoft has changed except their strategist and strategy. Instead of playing a no-win game of confrontation they will now seek to eventually control Linux completely. They see the threat from their greatest evil competitor (Google )and are going to try a flanking maneuver. So my prediction is that open source Linux will no longer exist in 20 to 30 years. If anything it will be like Android (Linux owned by Google) where an ordinary user has almost no access to the code and the OS is controlled by a "for profit" corporation. I'm sure the code is available somewhere but I have not been able to find it. What remains of open-source Linux will be a tiny niche OS for the very skilled and what is available will be controlled by large corporations. Linus will die of apoplexy (unless he sells out). :-)) Fortunately, I will not live to see that day and young people are too naive to be aware of the risk. And yes I am a cynic! :-) |
Hear, hear!
|
Quote:
The story itself is available at Project Gutenberg: www.gutenberg.org/ebooks/51233. |
Hee, hee, can't wait to read it!
Quote:
Thank you. I was unaware of the work and will find a copy and gleefully read it! Later that day... I read it. It was great! |
Quote:
Linux is already dead cause when a project like Debian is full of duckies which follow a Big Blue Corp (read systemd) it's the death door. What a init! Someone has been also forced to stop systemd resolv to surf the net due to systemd bugs, with resolver enabled system won't resolve names. But why is also dead? Stallman has not been wise enough, he was too good inside to look at his back, he had too much faith in humanities. They get rid of him to weaken free software movement. Torvalds is a lowland and has sold himself for money (greed is a cancer this time you are right) he forgot who he was and where he started. GNU/Linux was becoming too dangerous for Big Corps they bought what they can buy and eliminate who was not on sale but there's a justice. You are old, you remember VA Linux :D It doesn't take long, the worst financial crash ever is coming and for big corps they will be a bunch of troubles. We will laugh. Fortunately someone lasts i.e. antiX, Devuan, Slackware, PCLinuxOS, artix and a few more but we are to few to teach and not it savvy don't care about freedom cause they are not old like me and you and they don't know history GNU/Linux on everyone desktop hope is definitely dead not GNU/Linux by itself. For who has will to learn it will survive always if people leave flags (Read distros) and work together to build One GNU/Linux. IMHO |
All times are GMT -5. The time now is 12:11 PM. |