SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2013-04-04 01:50:40

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hey --

here's what free -h yields up after a while at swappiness set to 15:

anonymous@anonymous:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          1.0G       929M        71M         0B        10M       547M
-/+ buffers/cache:       371M       629M
Swap:         2.0G       101M       1.9G
anonymous@anonymous:~$ 

peace --

-- khs


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

Help fund CrunchBang, donate to the project!

#27 2013-04-04 01:54:45

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hi, dura --

fear, my friend, is a terrible thing, especially when it stands to bar the way to learning new things...  so i grew a pair and:

anonymous@anonymous:~$ sudo swapoff -a
anonymous@anonymous:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          1.0G       921M        79M         0B        10M       466M
-/+ buffers/cache:       444M       556M
Swap:           0B         0B         0B
anonymous@anonymous:~$ 

the sky did not fall in...  my system did not crash...

smile

peace --

-- khs

Last edited by kevin_scribner (2013-04-04 01:55:40)


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

#28 2013-04-04 03:31:47

kiiroitori
#! CrunchBanger
From: Tokyo, Japan
Registered: 2010-12-07
Posts: 226

Re: [SOLVED] some questions about "swap" and "swappiness..."

I don't know how much costs RAM where you guys live but when I assembled my machine I bought 16GB as it was much less than the average restaurant I went just after my purchase. So swappiness=0 for me!
As for increasing swappiness to free RAM for something "useful": Preventing slow disks reads and writes is something useful.


I love #! more than my own kids. I told them and they sympathized.

Offline

#29 2013-04-04 13:03:08

CBizgreat!
#! Die Hard
Registered: 2011-07-27
Posts: 1,505

Re: [SOLVED] some questions about "swap" and "swappiness..."

Jmo ... increasing swappiness is a no go anyway.

60 is ridiculous ... thus 75 must mean even more ridiculous. Swappiness 60 is hold-over from ancient dys, now it's sickenly ridiculous ... Disk i/o is horrendous and should be avoided imo anyway. See that thread.

If it pleaseth you ... if otherwise ... do the next best thang. tongue


Vll! smile

Last edited by CBizgreat! (2013-06-21 16:24:26)


Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Offline

#30 2013-04-04 13:58:47

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hey --

sadly, for me, right now, disposable income is something i can only dream about at night...  and, to make matters even worse, i'm told that this netbook, which is currently my only machine, as the Dell i initially began learning #! on got stolen just the other day, which came with 1 GB of RAM is only expandable to 2 GB... 

so, the general impression i'm getting, both here and amongst the sources i'm finding on the Intarwebz, is that unless you're running a server or a truly ancient version of Linux, neither of which is the case, for me, the default setting of 60 for swapiness is well in excess of what one needs, and degrades system performance, potentially by an order of magnitude...

resultingly, i believe it's time to permanently set my swapiness to 15 and enjoy the benefits of my research and the assistance and insights all of you have so generously proferred...  many thanks, #! people...

smile

peace --

-- khs


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

#31 2013-04-04 17:12:53

CBizgreat!
#! Die Hard
Registered: 2011-07-27
Posts: 1,505

Re: [SOLVED] some questions about "swap" and "swappiness..."

Didn't read most of the 1st forum pg of this topic. Unfortunately did read more than I'd've liked.. much want 2 babble on ... much am not going 2 anyway. Even the most extreme gnu/nix folks I've seen say set your swap partition size to x 2 RAM on the system. Imo ... that's ridiculous ... 1.5 x RAM is old ... 2 x RAM ... Errrrr ...

Not friggin going into that mess, but let's understand what friggin setting swappiness does for everyone. The higher your swappiness ... Generally the default is 60 ... the more propensity the kernel is going 2 have for swapping stuff out to disk ... EVEN if you have plenty of RAM available. IMO = BAD THING ... esp w swappiness 60 ... you can have plenty of RAM still free and the OS will start writing crap to hdd(disk) anyway. With the default it will start writing/swapping again even when someone haz hella free RAM. IMO DON'T FRIGGIN DO THAT ... It will o course slow down and crap up your OS's performance. THERE IS NO REASON TO SWAP when plenty of RAM is still available on your PC.

Gosh darn it long story short high or low ... reduce ya dam swappiness folks. Imo yes .. it's a decent performance tweak for everybody ... if your pc's specs are so low that it needs vm.swappiness=60 ... Jebuz ... I feel sorry for that person, on my crusty 512mb ddr2 deskop still set swappiness to 10 and it made a serious/positive difference on that pc. Almost never saw the swap partition used, after adjusting swappiness. Swap partiton size on it is ... all of 650mb ... Following the 1.5 x RAm recommendation thingy. Slightly less than the 1.5 x RAM deal ...

End of this chit ... Just my 2 cents on swappiness. Blahblahblah ...

Vll!

Last edited by CBizgreat! (2013-04-04 17:35:38)


Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Offline

#32 2013-04-04 22:41:19

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: [SOLVED] some questions about "swap" and "swappiness..."

kevin_scribner wrote:

hey, dura --

okay, i'll admit it:  after what i've read thus far, i'm afraid to turn swap off...

peace --

-- khs

What are you afraid off? If you temporarily disable swap, and the computer crashes, what`s the big deal? It`s not like a car that crashes. Your pc is just as fine after next reboot....

Besides, what`s the point in having 13 chrome tabs open and downlading lots of torrents and stuff just to provoce a potential problem? When we say that swap isn`t needed, then we are not saying that you can not construct a situation where it will be needed. If you don`t get a problem during normal use, then you got no issues, you just have developed a strange fetish. Who cares whether or not you are able to surpass 1 GB RAM use so that you need swap? If you try, then you probably will achive it. But whats the point. Do you engage in linux just to watch your cpu-load and ram-usage in conky?

Sorry dude, but your issue is constructed. If you want to run 13 chrome tabs, download 8 torrents simultaniously, and edit video and images at the same time, while you are watching hd-videos, and listening to mp3`s, then you construct a issue that`s not real. Nobody uses their pc like that....


- apt-mark hold account

Offline

#33 2013-04-05 12:22:41

fiernaq
Member
Registered: 2012-04-03
Posts: 18

Re: [SOLVED] some questions about "swap" and "swappiness..."

The amount of swap space you need and the swappiness you'll want to run at depends entirely on your usage and your hardware.  Most home users with just the basic word processing, internet browsing, light image editing, and music listening will rarely go over 4GB if that much.  On most lightweight linux systems I've ever used (such as crunchbang) I typically don't exceed 1.5-2GB.  In other words, if I have 4GB or more of memory then I basically don't need swap.  I say basically because there are some applications that will throw errors and there is actually still a reason to use swap space but in this situation I would stick with a 4GB swap file and a swappiness of 0.  If I only had 1GB of ram then I would keep a 2x swap file (2GB in this case) and a swappiness of at least 50 if not 60-75.  Your goal should always be to use your memory first and only resort to a swap if you have to but always err on the side of caution by having plenty of backup in the form of a swap file.

As for disabling the swap entirely... I've never done it on linux but every Windows machine I've ever done that with has eventually run into issues caused by disabling the swap.  I have 16GB of memory on my main Win desktop (I'm a gamer in my spare time and linux doesn't cut it for that.  Don't hate.) and disabling the swap completely still caused BSODs.  Unfortunately, due to the nature of a swap, you can't just have a partial swap file.  Your choices for swap size are "off", "same as memory", and "more than memory".  A swap of less than the amount of memory you have will cause issues.  Also, the less memory you have, the more you will want to increase the swap up to about 2x the size of your memory.

Offline

#34 2013-04-05 13:00:47

CBizgreat!
#! Die Hard
Registered: 2011-07-27
Posts: 1,505

Re: [SOLVED] some questions about "swap" and "swappiness..."

Can't believe this subject is still apparently so wildly misunderstood. Swapfile vs swap partition are two totally different things as far as I know. Swapfile ... while potentially very kewl ... can't do certain stuff ( again ... as far as I know.) Like hibernate, by way of example. Thus swapfiles vs swap partitions have their limitations surely. Errrr ... perhaps like needing an xgb swapfile per OS vs xgb swap partition all gnu/nix Os install share readily ?

Btw this lappy has 6gbs ddr3 ... and still wouldn't consider going w/o a swap partition. Sized it @ 1 to 1, meaning I have a 6gb swap partition on this thing. All gnu/nix OS's will happily detect/share that swap partition ... Might just be me .. but nopers ... I prefer having a swap partition available regardless.

Setting swappiness to 75 = tarded imo. Guaranteed to crap up a gnu/nix OS's performance imo. Again by way of example, the crusty desktop w 512mbs/ram ... With swappiness set at default = 60. Os would start swapping at say 150mbs, even with 362mbs/ram still standing by, ready to go and RAM being worlds faster than writing/reading crap from hdd. Setting swappiness to 10 ... I'd have to be using 420+mbs/ram before any swapping/ writing to disk would ensue.

Note: Those are not actual numbers ... but close enough. Way I'd setup and used that desktop. I literally had to push things to get it to start swapping. For me = Firefox 74 tabs/etc. I didn't monitor the situation to putting an absolute RAM use value on when the OS would start swapping. So w swappiness set to 75 ... You've used 80mbs of 512mbs/ram and OS begins swapping crap to disk furiously anyway. ? big_smile

Even if you had 256mbs of ram ... would still advise lowering swappiness. How many people today have a system so spec poor it only has 256mbs ? Swap is useful ... needed when a pc is so low spec that it can't afford 2 pay attention. Swap = virtual memory for the most part or in window$ = paging file. Beyond that ... you're dropping an anchor, that will slow you da heel down. Imo beyond doubt ... PERIOD. tongue

Far as I know the terminal cmds to disable/enable swap are "sudo swapoff -a" and "sudo swapon -a"  That's of course assuming you have sudo installed on your OS of choice. Otherwise ... kinda goes w/o saying do da chit as root ? Far as I know(learned) disk i/o is BAD, BAD ... very few exceptions !!! tongue

Lmao ... though thread is marked as solved and we're all still posting anyway ( includ me, lmao.)


Vll! smile

Honorable mention tweak ... though this isn't an across the board kinda thing. Noatime vs relatime on gnu/nix. Something to look @ for anyone interested I guess. Google can tell people far more than I can ... About absolutely EVERYTHING. tongue Dork aka = me, likes noatime for my Os's. Google if uncertain eh ? Jmo relatime ... isn't at all a bad compromise anyway.

Also note ... been a tweaker/optimizer since ... well ... since I can remember folks. Doesn't matter window$ or gnu/nix. Pretty much always been a compulsive tweaker regardless. Whatever I like and/or works for me = YMMV.

Last edited by CBizgreat! (2013-04-05 14:43:48)


Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Offline

#35 2013-04-05 16:36:44

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hey there --

ew:  i did not construct that scenario to fit the discussion at hand...  that was me in the course of normal computing...  i was downloading a bunch of torrents, and i had the tabs in chrome open as i was researching the whole swap / swapiness thing...

your reply seemed a bit brusque, if you don't mind my saying so - my apologies if i've gotten on your nerves with the whole thing:  unintended...

peace --

-- khs


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

#36 2013-04-05 17:30:38

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hey --

you know what, ew...?  after further consideration, your reply there was downright rude and strikes me as pretty much uncalled for...  that is not the sort of thing i've come to expect in my admittedly short time posting to and learning from this community...

i've got a crappy little netbook...  i'm trying to get the most out of it, so i chose this distribution because it was the one i've come to think might be the one to help me further that goal...  i'm ridiculously poor, so i can't go sinking money i don't have into hardware improvements...  occasionally, i get handed an old fossil of a computer that is on its way to landfill, and i've been trying to get these going with #!, to expand my understanding and to keep the machine out of a dumpster [whether it belongs there or not]...

i have only recently stepped away from Windows completely, so all my proverbial eggs are in the one #! basket right now...  perhaps i should have known that a crash wouldn't have long-term effects, but i didn't...  i don't think it's the most utterly stupid thing in the world to have concerns that, after all the work i've put into getting my system where it is right now, a crash might mean i'd have to start all over again -- which i would, but i'd have to do all the same work i've done thus far over again...  it's a small cost, but it's a cost, and i was weighing it, since i was dicking around with things i didn't completely understand, so as to understnd them better...  i guess i have a bit of a personal vanity issue, perhaps, in that if it all goes tits-up, i'll feel like an idiot and an ass, especially when i get askance glances from the Windows-only folk around me who've heard me crowing about my #! experience...

in my "real-world" life, i'm the only linux user that i know, so i don't have the luxury of asking real people for real answers, so i read...  a lot...  printed books and online resources...  sadly, i guess i'm limited in my ability to get real-world answers without being able to ask simple questions and get specific, simple answers, so i posted my lack of understanding here...  and got a lot of really helpful input, as i've received with other questions i've posted here...

for the record, i may have some strange fetishes, depending upon the values one assigns to the word "strange," but conky-watching isn't one of them...  and if i'm using my computer in a way that nobody does [keeping a facebook page open while downloading a few movies, songs and android games, while also following links on a subject i'm researching], well, what can i say...?

i certainly wouldn't go constructing issues for the sake of being able to post and argue about them...  literally *everyone* here knows more than i do about everything that's going to be discussed here...  i'd be a fool to engage *anyone* in any kind of intellectual jousting... 

in any case, i don't think the reply you posted was called for nor in keeping with the general sense of n00b-friendliness i've experienced here so far, nor with the stated intent of the community forums...  i certainly didn't like it...  it was just a little niggling thing at first, but it's grown on me enough that i felt the need to respond to it publicly...  you probably didn't intend it nearly have so offensively as i've ended up taking it, but that's how words work when you release them into the wild sometimes, i guess...

apologies, all around, for venting where you might end up reading it...  i'll do my best to let it drop, here and now...

peace --

-- khs


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

#37 2013-04-05 17:36:03

kevin_scribner
#! CrunchBanger
From: Boston, Ma USA
Registered: 2013-02-26
Posts: 103

Re: [SOLVED] some questions about "swap" and "swappiness..."

hello --

thanks, fiernaq, for the clearly and concisely stated explanations...  very helpful, and very much appreciated...

peace --

-- khs


> while :
> do if windows sucks then mv windows /dev/null;
> apt-get install crunchbang; fi;
> done

Offline

#38 2013-04-05 19:13:02

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: [SOLVED] some questions about "swap" and "swappiness..."

kevin_scribner wrote:

hey --

you know what, ew...?  after further consideration, your reply there was downright rude and strikes me as pretty much uncalled for...  that is not the sort of thing i've come to expect in my admittedly short time posting to and learning from this community...

i've got a crappy little netbook...  i'm trying to get the most out of it, so i chose this distribution because it was the one i've come to think might be the one to help me further that goal...  i'm ridiculously poor, so i can't go sinking money i don't have into hardware improvements...  occasionally, i get handed an old fossil of a computer that is on its way to landfill, and i've been trying to get these going with #!, to expand my understanding and to keep the machine out of a dumpster [whether it belongs there or not]...

i have only recently stepped away from Windows completely, so all my proverbial eggs are in the one #! basket right now...  perhaps i should have known that a crash wouldn't have long-term effects, but i didn't...  i don't think it's the most utterly stupid thing in the world to have concerns that, after all the work i've put into getting my system where it is right now, a crash might mean i'd have to start all over again -- which i would, but i'd have to do all the same work i've done thus far over again...  it's a small cost, but it's a cost, and i was weighing it, since i was dicking around with things i didn't completely understand, so as to understnd them better...  i guess i have a bit of a personal vanity issue, perhaps, in that if it all goes tits-up, i'll feel like an idiot and an ass, especially when i get askance glances from the Windows-only folk around me who've heard me crowing about my #! experience...

in my "real-world" life, i'm the only linux user that i know, so i don't have the luxury of asking real people for real answers, so i read...  a lot...  printed books and online resources...  sadly, i guess i'm limited in my ability to get real-world answers without being able to ask simple questions and get specific, simple answers, so i posted my lack of understanding here...  and got a lot of really helpful input, as i've received with other questions i've posted here...

for the record, i may have some strange fetishes, depending upon the values one assigns to the word "strange," but conky-watching isn't one of them...  and if i'm using my computer in a way that nobody does [keeping a facebook page open while downloading a few movies, songs and android games, while also following links on a subject i'm researching], well, what can i say...?

i certainly wouldn't go constructing issues for the sake of being able to post and argue about them...  literally *everyone* here knows more than i do about everything that's going to be discussed here...  i'd be a fool to engage *anyone* in any kind of intellectual jousting... 

in any case, i don't think the reply you posted was called for nor in keeping with the general sense of n00b-friendliness i've experienced here so far, nor with the stated intent of the community forums...  i certainly didn't like it...  it was just a little niggling thing at first, but it's grown on me enough that i felt the need to respond to it publicly...  you probably didn't intend it nearly have so offensively as i've ended up taking it, but that's how words work when you release them into the wild sometimes, i guess...

apologies, all around, for venting where you might end up reading it...  i'll do my best to let it drop, here and now...

peace --

-- khs

Ok. sorry that I made you feel offended. That was not my intention. Sometimes I wrongly assume that most people can handle both sarcasm and ironi, and even think it`s funny when it hit themselves. I`m probably acustomed to a little rougher tone without anyone taking it to seriously. But I should have been more carefull considering that you are new, and probably have you sensibility antennas fully up. Anyway, it`s nice to see that you stick up for yourself.

As regarding the topics we discussed I was a bit impatient, hoping that you would take the signals. Nothing bad will happen by temporarily disabling swap for one session to test. I probably told you so in a sarcastic tone, but you didn`t seem to take it, and you seemed still very scared about the consequenses of turning swap off. Ok, your session could crash, so what? Is there any harm in that?

I can`t see what your finances got to do with it. My goal was the same as yours. Getting the most out of your netbook, by swapping as little as possible, and perhaps not at all. I just wanted you to test it, and go with what you felt was the best according to your own experience trough testing it. I told you to have faith in yourself, and not have us telling you what was best in your situation. We can tell you how to turn swap on/off, we can tell you what we would do regarding swappines, but it is you, and only you, that can decide what it is that gives you the best experience with you netbook. The results don`t lie. Why doubt yourself? Was it better with 75% swappiness, or not? Only you can tell....

And by all means, don`t let me scare you away. Hopefully there are few like me in here. I`m born and raised in a rough enviroment and aren`t a tiny bit sensitive about anything. You now, us scandinavian vikings. All testosteron. Kill or be killed. You eat what you shoot, and so on...


- apt-mark hold account

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo