O/T: Ubuntu questions.

Hello all.

I have recently installed Ubuntu 15.10 and after past failed attempts at adopting Ubuntu, this time it is going very well (I'm even considering buying an SSD for the machine).

I have some questions though:

In the System Monitor, under the Resources tab, the second display down is "Memory and Swap History". I understand that Memory is displaying the amount of RAM being used, but why does it slowly increase when using Firefox? Even when just one tab is open.

What is Swap?

If you could reply in the simplest way possible, I'd be grateful!

Thanks in advance,

David Paste.

Reply to
David Paste
Loading thread data ...

Swapping (and Paging) is a method to free RAM but writing out idle memory pages (blocks) to disk and leaving a pointer instead. Due to the magic of virtual memory, the address map for that process's page that got swapped out is made invalid. When the process tries to access that page, the virtual address hardware in the CPU finds and invalid pointer and faults to an interrupt hander. That handler looks up the page and decides if it is a) actually invalid (the process then generally is terminated) or if the page is actually on disk.

It retrieves the page from disk (and sometimes a few consecutive pages for good luck), puts them into RAM and updates the process's virtual address tables. The process is allowed to resume, retrying the failed instruction, which now works.

Strictly, "paging" is the above and "swapping" is when the whole idle process is written out to disk. But in practise the concept and effects are much the same.

If you have boat loads of RAM you can not bother with a SWAP partition/file. However SWAP is also used by Linux for hibernating (not suspending, when the RAM is kept running but the CPU is stopped).

Reply to
Tim Watts

In message , Tim Watts writes

Paging is what Windows shows as Page File Usage, or PF Usage? I do look at the Performance tab of Task Manager, but don't pretend to understand exactly what I'm looking at. Currently, my CPU usage is hovering around

10% which is probably OK, but PF Usage is 2.42GB which is probably not so good.

Apologies for stealing this Ubuntu thread. Just to say that I too was a dedicated Firefox user, but have now dumped it (and Pale Moon) for Chrome because it eventually caused this little Netbook to freeze. Not BSOD - it just froze and nothing except the 'off' button and reboot would work.

Reply to
News

It is not necessarily firefoxes fault. Its possible to write (malicious) JavaScript that simply demands more and more memory

However when I showed a basic HTML5 video based web page to a friend with windows 10, Edge blue screened the computer!

"I haven't seen that for a few years" he mused...

Reply to
The Natural Philosopher

Sure, but the firefox derivatives don?t handle those web pages very well at all.

Yes, but in my case it?s just 3 of the weather pages from a single weather provider that is the problem, so it clearly isn't malicious. Just incompetent programming basically.

Reply to
hunar

I guess - I don't do windows :) But the OS principles are the same and by its name, I suspect its the same.

Not probably - it's having a stroll, rather than a sprint :)

You need a windows person. Sometimes, it's better to page out large amounts of dead memory that is never used (unused lumps of data or code in a program, or at least "unused" in the context of what you are doing right now) and use the space of disk buffers (cache).

There's also a method of paging that does not use the pagefile - at least on linux. If you load a program and all its linked code libraries, the whole lot gets mapped into the process's virtual address space.

However, it tends to not get read in until needed - this happens by the program and the libraries being mapped as mini pagefiles into the address maps, but not actually physically read in.

Program goes to the "print" routines (say), trips a page fault - that causes the same paging code in the kernel to look for the page file blocks (that this time happen to be the program or library file) and read them in, resuming the program when done.

In the same way, not-recently-used blocks of the program can simply be dropped from RAM (no need to write out - code is read-only, we already have the original in the file) if the system thinks it needs RAM for something else.

I have no idea if Windows employs that strategy - it's always been my observation that linux handles memory better than windows, but that's a) because I hate Windows, b) may be less true with the modern versions.

The fun happens if the kernel needs a page of RAM for its own use, hasn't got any spare and needs to run the pager to free some, except the pager needs some extra RAM to do its work.

Real problem - solved in part with the concept of "kernel non paged pool" (locked pages of RAM that cannot be paged out).

Reply to
Tim Watts

formatting link

Well, you did ask.

Reply to
Huge

Firefox is a pig with ram. Even just lion there it uses elephantine amounts of it. Antyway, I just kill it when it gets to a gig - one day I expect the future equivalent of FF will use an even wilder amount, like a pet of ram.

NT

Reply to
tabbypurr

[snip questions I can't answer]

I also am testing linux for about the 10th time and I think I am going to stick with it this time and finally rid myself of Windows. Ubuntu has got a lot better with each release, while windows is slightly worse.

I am using an acer chromebook off ebay with chrome os replaced by a full install of ubuntu. An excellent slim, light, portable notebook for a very low price thanks to a bit of diy. I want to upgrade the SSD drive (it's only 16Gig) and bought a cheap chinese drive which doesn't work for reasons I don't understand, so beware.

The chinese SSD is now in a case so I can use it as a 120Gb pen drive and it seems to work fine like that.

Best wishes, Tim W

Reply to
Tim W

My impression, as a long time user of win2k and repairer of subsequent shittier versions, is that they both use, more or less, the same paging algorithms. The major difference being that *all* versions of NT based windows use a page *file* rather than the higher performance swap

*partition*.

What's worse are the invented pagefile options available of which the worst one (adjust pagefile size automatically - on the fly, both upwards and downwards), is the default setting on new installs - including every major OEM setup I've ever seen.

The other options are "System Managed" (whatever the f*ck that means) and setting a minimum and a maximum size limit (there may be another one but I'm just remembering this off the top of my head). On an HDD installation, this default is really bad news since the constant resizing activity magnifies the effect of file fragmentation as well as adding extra overhead to the paging algorithm.

If you don't want your windows PC to become old and arthritic before its time, you need to figure out what size pagefile you want and set the min and max values to that size as the very first configuration change after doing a clean install. This then gives you a (possibly completely - but no guarantees on this) unfragmented fixed size pagefile which won't aggravate the inevitable file fragmentation activity from ordinary everyday use, further aggravated by the endless OS file churn due to a never ending stream of updates and patches.

The use of SSDs has rather sidelined this deliberate misuse of the paging mechanism to effect premature system performance loss in the name of boosting the sales of new PC kit (it's the "Wintel Effect"). The effect of file fragmentation on system performance is all but eliminated in the case of an SSD installation so this deliberate 'accelerated aging' policy no longer works for "Wintel" (it's still a good idea to set a fixed size pagefile, if only to pep up the paging algorithm a little).

I'm rather disappointed to see that Ubuntu and its derivatives resorting to the madness of a single huge partition for the /boot and /home folders and using the creation of a swap file instead of a dedicated swap partition space. Luckily, you can over-ride the default automated partitioning scheme used by the installer but it needs some familiarity and an understanding of partitioning to get this reasonably right.

There is usually a "Guided Partitioning" option in modern day distro's installers but I can't recall whether it offers to create a dedicated swap partition or not since I use manual control to get what I want (mind you, for a lot more reasons than just to make sure a dedicated swap partition is created).

I've edited win2k's registry to stop it paging kernel ram space along with quite few other tuning tricks in the dim and distant past. If I had to do a scratch install of win2k on real hardware, there's quite a bunch of things I'd have to research yet again. :-(

Reply to
Johnny B Good

Well I dont remember deliberetaly creating it, but this linux mint (Ubuntu derivative) has a swap partition.

Reply to
The Natural Philosopher

That's just stupid - and forgoes all the good unix principles.

Me: I use either:

/boot, / and /srv for data (and /home is mapped in the last one)

or /boot and LVM for everything else, which makes new installs alongside the old easy.

I have not set up SWAP for some time now - having plenty of RAM. My VMWare servers at work, all 190 odd no not use SWAP either[1] *unless* it is probably of benefit (like a server once a day does a big batch job, then quiesces for the rest of the time).

[1] Because all that swapping is being concentrated down onto one poor SAN group. I find it better to over allocate RAM a bit and let VMWare do its bubble and borrow thing between VMs.
Reply to
Tim Watts

Of course. JBG is wrong, as usual.

Reply to
Huge

And wrong. It's JBG - just ignore it.

Reply to
Huge

Thanks to you all for the info!

Reply to
David Paste

When I read up about Ubuntu on the various websites and forums, the biggest gripe I hear is about the use of Unity as a desktop. I like it though! I have a friend who chooses Mint Linux because he wants his desktop to look like Win 2000. Each to their own. I can't help but think that the lack of a consistent desktop has managed to put many people off Linux in the past. Majority of people won't care, I'd bet, but those that do can modify their own to their heart's content.

There are a few silly things in Ubuntu that I found not idiosyncratic but down-right annoying: the main one being that clicking an application's button on the vertical sidebar didn't minimise the open application. I sorted the fix out and on the way found out that that was apparently a deliberate choice made by some honcho in one of the companies. Silliness.

I am still trying to sort out the scuppering of the WiFi when the laptop comes out of hibernation or suspend or whatever it's called, but it's not so important at the moment.

I also copied a load of fonts over from the Windows computer which helps with many little display quirks, one for instance, the display of text on TNP's Gridwatch website. It now displays perfectly in FireFox on Ubuntu using the Windows-pilfered fonts. It doesn't display correctly on FF under Win 8.1 using the same fonts, by the way!

The most important thing I did to make the desktop more comfortable was to change the desktop background to my favourite picture of the night sky! ha, simple things, eh?

Was that a difficult thing to do? Did you have to fettle any of the innards - I have some vague notion that newer computers have a special BIOS that can really bugger up swapping OSes.

What is the screen like? There was a Chromebook which was renowned for it's high quality screen.

Cheers!

Reply to
David Paste

That's why mots people run linux MINT. Its ubuntu with a better desktop

- MATE and Cinnamon are very XP - Like

That's a deep and tricky problem. A lot de3opends on how the drivers actually behave.

Hmm. I have pilfered so many fonts from so many places its hard to see whats what.

>
Reply to
The Natural Philosopher

Yeah, my friend is very particular about things like that. As much as he can he has the same layout and same apps on Linux and Windows. I put it down to the sheer amount of weed he smokes and the subsequent need to not make things unnecessarily tricky when switching machines!

Yeah, it is becoming apparent the more I read! But I am sure nibbling at it will eventually get rid of the problem!

You need better fonts then ;-)

Reply to
David Paste

I use Ubuntu on my work machine. Corporate choice, not mine.

Some plonker in Ubuntu has decreed that the task bar will be on the left hand side of the monitor. That's the long edge on mine, and it takes up a stupid amount of space.

Andy

Reply to
Vir Campestris

So one edge is longer than the other edge? Must be a strange monitor!

Reply to
cl

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.