|
|
Subscribe / Log in / New account

worse than it should be

worse than it should be

Posted Sep 7, 2009 13:42 UTC (Mon) by job (guest, #670)
In reply to: fixed those JPGs by mingo
Parent article: BFS vs. mainline scheduler benchmarks and measurements

Let me explain what Firefox did with the initially large pictures: It allocated memory. That practically kills a normal PC with Linux today. My machine took four whole minutes until I could ctrl-alt-f1 and kill the offending process.

I understand VM pressure is high, but why can't normal apps get at least a small timeslice now and then even in these extreme situations?

It would be a bit discouraging to say the least if this was a desktop users first impression of Linux; that it "hangs" (sort of) if you click on a large picture in your web browser.


to post comments

worse than it should be

Posted Sep 7, 2009 14:18 UTC (Mon) by mingo (guest, #31122) [Link] (1 responses)

What happens during big VM pressure rarely depends on the process scheduler. If you monitor your system during such situations you'll see there's plenty of idle CPU time - just nobody is able to make progress because everyone will be swapping around small fragments.

[ Or if there's a lot of CPU time used, it's all kswapd's ;-) ]

worse than it should be

Posted Sep 7, 2009 20:40 UTC (Mon) by alankila (guest, #47141) [Link]

compcache seems to really help about with making progress. Even if you are swapping, it's so fast that you can actually use your system: start new terminals, run top, etc. Even if the task is in an allocation frenzy and ends up OOM-killed, it does so with relatively little disk activity.

I really have a love affair with it compcache---to the point that I have given up all other types of swap and am now married to this single solution. It can also help with large images, especially those that are mostly single color. I imagine those pages compress very, very well...

worse than it should be

Posted Sep 7, 2009 15:42 UTC (Mon) by epa (subscriber, #39769) [Link] (2 responses)

Oh, the ironing. Maybe 'open huge image in Firefox' should be added to the set of kernel benchmarks? The measurement would be how long it takes for some other process to allocate and use a mere twenty megabytes while Firefox is thrashing around.

worse than it should be

Posted Sep 8, 2009 8:12 UTC (Tue) by mjthayer (guest, #39183) [Link] (1 responses)

I wonder why other processes have to suffer so much at all for Firefox's memory allocation? It ought to be possible (*) to limit the rate at which a process can cause pages belonging to other processes to be swapped out, and to ensure that the other processes never go below a certain threshold of physical pages (possibly a lower threshold for processes that are rarely used, but even they are probably in memory in the first place for a reason).

(*) Yes, I know someone still has to do it. If no one else does, and I don't get told at once on LWN why this is such a bad idea, perhaps I will have a look at if I ever have a free minute...

worse than it should be

Posted Sep 16, 2009 20:06 UTC (Wed) by oak (guest, #2786) [Link]

Put Firefox to a container group of its own and set a limit on the active
pages it can have?


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds