View Single Post
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#1
I liked so much the kernel hack described by kaze.daniel, allnameswereout and better explained by Simon that I made a package to test it without messing with a root xterm.

The package changes a number of kernel parameters when installed and adds a script to event.d to make the changes permanent. When removed, the script is deleted and the parameters are reset.

Be careful and test it, I'm no expert and made the package "by hand" with dpkg-deb on my ubuntu box.

Let me know if it destroys your n900 or sends your personal data to some rogue site

Also let me know if your n900 gets much snappier after installing it, like mine

____________________________________

As requested by lcuk

> In the top post for this thread, indicate CLEARLY
> the actions and changes it makes

The package issues the following commands which change the way the kernel handles ram and virtual memory (as far as I can understand, i.e. hardly at all)
Code:
echo "30" > /proc/sys/vm/swappiness        
echo "0" > /proc/sys/vm/page-cluster        
echo "1" > /proc/sys/vm/laptop_mode        
echo "1" > /proc/sys/vm/oom_kill_allocating_task        
echo "0" > /proc/sys/vm/dirty_expire_centisecs        
echo "0" > /proc/sys/vm/dirty_writeback_centisecs       
 echo "60" > /proc/sys/vm/dirty_background_ratio        
echo "95" > /proc/sys/vm/dirty_ratio        
echo "0" > /proc/sys/net/ipv4/tcp_timestamps        
echo "1" > /proc/sys/net/ipv4/tcp_no_metrics_save
> files modified and overwritten etc

No files are harmed by installing this package, and no carbon dioxide is released . It adds a /etc/event.d/tuning script as described in the swappiness thread.

> In the package, add a clear indication
> of its actions in the README and
> potentially a man page and/or
> a backlink back to here so others can
> discover its actions easily.

The package description has links to the relevant posts in the swappiness thread.

In the next version I'll add also a link to this thread and a banner in postinst and postrm, if & when I discover how's done
_________________________

I told you I wasn't an expert! Version 0.1.0-1 was flawed in postinst and didn't erase the /etc/event.d/tuning file after package removal (thanks to Mikkov for reporting).
Latest version, 0.1.2 corrects the problem.
Attached Files
File Type: deb swappolube-nogui_0.1.2_armel.deb (3.1 KB, 1015 views)
__________________
Ernesto de Bernardis


Last edited by debernardis; 2010-10-07 at 15:04.
 

The Following 175 Users Say Thank You to debernardis For This Useful Post:
9000, aanckar, acvetkov, adhrie, aeol, ahmadamaj, Alex Atkin UK, alienhead, AlMehdi, arcticrobot, arnoldux, atilla, backstabber8, BertvanDorp, Bingley Joe, blipnl, Bobbe, borghal, Bundyo, Camaron, ceevee, CepiPerez, cfh11, Changegames, cheve, clasificado, clovis86, corduroysack, Crashdamage, Crugath, cutehunk04, Cybergr, D4rKlar, Dark_Angel85, dashti, DaSilva, datjomp, dave1010, davidian, Dead1nside, Dousan, Drekkie, dscobsct, Duy2anh, ed00, elbttrd, eMiL, Erebo, etuoyo, evad, excelar8, ezameht, fgs, fleetwood, fotis9, fpp, frostbyte, fw190, gabby131, gazza_d, grog, gryedouge, heiwid, Hellmur, HtheB, iagamy, IceJunior, ivnvir, Iyanyola, jaeezzy, jakiman, joelsk, JonWW, jorjino, jurop88, kanna, kent_autistic, klinglerware, knuthf, Larswad, lcuk, leetut, lubabula, lugkhast, m750, maartenmk, maemoiv, maluka, Mandibela, mankir, mannakiosk, Marklar, marxian, masloff, maximilian1st, mehulrajput, Mentalist Traceur, mikki-kun, Minhaz, moepda, MohammadAG, mony123, mosiomm, mrsellout, mthmob, mveplus, n900maniac, Natan_xy, navsin, Nikem, noobmonkey, nux, oldnetdog, ossipena, OVK, P@t, pantera1989, Patola, pavlik, peppe78, peterleinchen, pinkfloyd, plaban, pycage, qole, qosmio, Radishface, raven, rdwrig0ceo, rebhana, retsaw, Rob1n, S0urcerr0r, sachin007, SallyJane, sashabe, SavageBrat, Scottlfa, scribbles, sdixit, shallimus, sjgadsby, skalogre, smartypants, sony123, SpeedEvil, Stonik, strange1712, Straycat, sula, Tharna, thebtman, timsamoff, titi974, travik, tushyd, Umlungu, v13, v2px, Veleno, vkv.raju, VulcanRidr, Wanker, Wikiwide, wimmme, winet05, wowsher, zehjotkah, zem, zetagi, zillertal, zimon