You are on page 1of 11

EasyLinuxtipsproject

Since2009this
websiteisacomplete
quickguideforLinux,
bothforbeginners
andforexperienced
users!

Searchthissite

SolidStateDrive(SSD):optimizeitforUbuntu14.04,LinuxMint17andDebian

Backtothehomepage
Thiswebsiteisbeingsponsoredby
GoogleAds.
Areyouusinganadblocker?Thenyou're
alsoblockingmyearningsfrom
advertisements....
Belowyou'llfindacompletehowtofor
optimizingyourSSDforUbuntu14.04,
LinuxMint17andDebian.Sothatyou'llbe
abletoenjoyyourSSDformanyyears!

UbuntuandLinuxMint,
theeasiestkindsof
Linux.
93

Mostpopular
DothisfirstinUbuntu
14.04LTS
LinuxMint:selecttheright
flavourforyou
LinuxMint13Xfce:the
idealreplacementfor
WindowsXP
Wirelesssecurity(wifi):
fourmythsand11tips
Avoid10fatalmistakesin
UbuntuandLinuxMint
Sitemap

Ubuntu14.04Trusty
Tahrisabetterchoice
than14.10Utopic
Unicorn!

Ifyouwishtosupportmywebsite,you
canconfigureyouradblockertomakean
exceptionforthiswebsite.Thanksin
advance....

Note:thishowtoisonlyforUbuntu,Linux Limitswapwear
MintandDebianthehowtoforopenSUSE
isonanotherpage.
10.Withtheactiondescribedbelow,youlimit
theuseoftheswappartition(thevirtual
memoryontheSSD).Withoutdisablingit
Contents
entirely,becausethatwouldgotoofar:in
1Avoidexaggeratedmeasures
caseofextremeRAMload,Ubuntuhastobe
2BIOSandUEFI:setittoAHCI
ableto"swap".
3Checkforupdatedfirmware
4Avoidquickwear:reducewriteactions
5Reservesevenpercentforoverprovisioning
6Duringinstallation:chooseEXT4
7Aftertheinstallation:noatime
8StillrelevantforUbuntu14.04andLinuxMint17:
automaticTRIMbyrc.local,bycronorbydiscard
8.1Preferredmethod:byrc.local
8.1.1Disablethesuperfluousweeklycronjobfor
TRIM
8.2Onlyforcomputersthatarealwayson:bycron
8.3Notadvised:bydiscard
9HowtoexecuteTRIMmanually
10Limitswapwear
11Almostreadyafterreboot
12LimitthewriteactionsofFirefox
13LimitthewriteactionsofChromeandChromium
14Ubuntu12.04andLinuxMint13:changethe
schedulertodeadline
15DoNOTenablehibernation
16AlsoforanSSD:preventfragmentation,andDO
NOTdefrag
17Dualboot?Don'tletWindowskillyourSSD
18EnjoyyourSSDcarefreeforyearsandyears
19Optional(advancedusers):temporaryfilesandlogs
20Wantmore?

Ubuntu'sinclinationtousetheswap,is
determinedbyasetting.Thelowerthe
settingnumber,themoresystemloadis
requiredbeforeUbuntustartsusingthe
swap.Onascaleof0100,thedefaultsetting
is60.Whichismuchtoohighfornormal
desktopuse,andonlyfitforservers.For
SSD's,it'sjustcrazy.
Adetailedexplanationcanbefoundhere
(linkdead?Thendownloadthispdffilewith
thesamecontent).
Nowthehowto:
a.Firstmakesurethatyouhaveinstalledthe
applicationsgksuandleafpad.
b.Nowcheckyourcurrentswappiness
setting.Typeintheterminal(use
copy/paste):
cat/proc/sys/vm/swappiness
PressEnter.
Theresultwillprobablybe60.

Avoidexaggeratedmeasures

c.Nowtypeintheterminal(usecopy/paste):
gksudoleafpad/etc/sysctl.conf

1.Firstawordofcaution:don't
exaggerate!There'salotofexaggeration
tobefoundonthewebonthisissue.
Ontheonehandyouhavepeoplewho
don'ttakeanyspecialmeasuresforSSD's
atall,andontheotherhandyousee
peoplewhotakeallkindsofextremeand
complicatedprecautions.Neithersideis
behavingsensibly.
Thishowtowillshowyouhowtoachievea
verygoodresultbyapplyingjustafew
rathersimplemeasures.Withthose,you'll
beabletoenjoyyourSSDcarefree,for
yearsandyearstocome!
....readherewhy.Click
hereforyourownfree
copy!

AstaroftheUbuntu
family:Xubuntu!

Youcangetyourown
freecopyhere.

105

dayssince
Ubuntu14.04.1(first
pointreleaseor
"ServicePack1")

Releasescheduleof
Ubuntu14.04LTS
TrustyTahr

2.ASolidStateDisk,orratherDrive(SSD),
issometimesonlyrecognizedproperlyby
theBIOSorUEFI,whenintheBIOSthe
featureAHCIhasbeenactivatedforSATA
(insteadofIDE).
Thisfeaturemaybehardtofindinthe
BIOS/UEFI,becausethere'sabsolutelyno
standardizationatallinmenustructuresfor
theBIOS(sigh....).That'swhyI'vemade
twoscreenshotsoftheBIOSofmy
computer,inwhichyoucanseethis
particularfeature.Hopefullyit'llhelpyouto
finditinyourownBIOS/UEFI....
Themotherboardofmycomputeris,bythe
way,anMSIH61MAE35(B3).

Note:doesn'ttheBIOSorUEFIofyour
computeroffertheoptiontoswitchto
https://wiki.ubuntu.com/TrustyTahr/ReleaseSchedule
AHCI?ThentheBIOSwillpossiblydetect
theSSDautomaticallyandautomatically
choosetherightBIOSsettingsforit.

212

dayssince
endoflifeforWindows
XP:quicklyreplaceit
byLinux!

Theidealreplacement
forWindowsXP

d.Addthefollowingbluelines,atthevery
endoftheexistingtextinthatfile(use
copy/pastetoavoiderrors):
#Sharplyreduceswapinclination
vm.swappiness=1
e.Savethefileandcloseit.
f.Nowproceedtothenextitem.
Almostreadyafterreboot
11.Rebootyourcomputer.

Takingintoaccountthelongwarranty
YourSSDisalmostreadynow,butnotquite.
periodsthatthemanufacturersaregiving,
Soafterthereboot,proceedtothenextitem.
probablyformorethanfiveyears(10years
shouldbeareasonableexpectation).
Considerablylongerthananordinaryplatter LimitthewriteactionsofFirefox
harddisk,anyway...
BIOSandUEFI:setittoAHCI

Inforapleasant
surprise?Experiencethe
elegantsimplicityof
Xubuntu!

PressEnter.

Firstofall,intheBIOSofmycomputerIgo
tothetabAdvanced,andthereIexpandthe
sectionIntegratedPeripherals(clickonthe
imagebelowtoenlargeit):

12.YoucanlimitthewriteactionsofFirefox
asfollows.
a.Setthecacheto0:
Firefoxmenubutton(withthethreedashes
onit)PreferencesAdvanced
TabNetwork
section"CachedWebContent":tickOverride
automaticcachemanagementandsetthe
cacheto0MB.
b.IfyouhaveinstalledOracleJava,limitthe
writeactionsoftheJavaplugin:
launchtheJavaControlPanelTabGeneral:
TemporaryInternetFilesSettings...
Removethetickfor:Keeptemporaryfileson
mycomputer.
LimitthewriteactionsofChromeand
Chromium
13.ThewriteactionsofGoogleChromeand
Chromiumcanbelimitedasfollows.
LaunchChrome/Chromium.
NowpresstheF12key,inordertoopenthe
developers'console.Inthatwindowyouclick
onthegearwheelinthebottomright,inorder
toopenthesettings.Seethescreenshot
below(clickonittoenlargeit):

LinuxMint13Xfceisthe
idealreplacementfor
WindowsXP!Readhere
why.

Then,undertheheader"SATA
Configuration",IchangeIDEintoAHCI
Mode.NamelyforSATAMode.
Then,undertheheader"ExternalSATA
6GB/sConfiguration",IalsochangeIDE
intoAHCI.NamelyforExternalSATA6gb/s Inthesettingswindowyoutick:Disable
cache.
ControllerMode.
Seetheimagebelow(clickonittoenlarge
it):

PressF12againtoclosethedevelopers'
console.You'redonewithChrome/
Chromium.
Note:userpreference,sorepeatineach
useraccount.
Nowproceedtothenextitem.
Ubuntu12.04andLinuxMint13:change
theschedulertodeadline

Checkforupdatedfirmware

14.Bydefault,Ubuntu14.04andLinux
Mint17usetheI/OschedulerDeadline,
whichisgoodforbothSSD'sand
conventionalplatterharddisks.Soforthe
scheduler,youdon'thavetochangeanything
inUbuntu14.04orLinuxMint17.

3.CheckthewebsiteoftheSSD
manufacturer,whetherthere'sanupdated
versionavailableofthefirmwareforyour
SSD.Ifso,applyit.

ButUbuntu12.04andLinuxMint13by
defaultstillusethe"old"I/OschedulerCFQ,
whichisonlyfineforconventionalharddisks
butnotforSSD's,whicharebeingslowed
down.Soit'swisewhenyouhaveanSSDin
FormostSSD'sitdoesn'tmatterthatyou're yourmachine,tochangetheschedulerin
runningLinux,becausemany
Ubuntu12.04orLinuxMint13toDeadline.
manufacturersoffersuchfirmwareupdates
bymeansofanisowithwhichyoucan
Youcanrealizethisbychangingtheboot
createabootableCD.
parametersofGrub.Youcandothatas
follows.
Inthefirstyearafterpurchase,repeatthis
checkeverymonthorso.
a.Firstmakesurethatyouhaveinstalledthe
applicationsgksuandleafpad.
Avoidquickwear:reducewriteactions
4.ASolidStateDriveisworndown

b.Thencheckyourcurrentscheduleras
follows.Usecopy/pastetotransferthe
followingcommandlinetotheterminal:

relativelyquicklybywriteactions.
EspeciallytheoldestgenerationsofSSD's
werevulnerableinthataspect,buttoa
lesserdegreethat'sstillthecaseforthe
newergenerations.

cat/sys/block/sda/queue/scheduler
(ifyourdriveisn'tsda,changetheline
accordingly)

PressEnter.
Traducir
Belowyou'llfindsometipsonkeepingwear
downtoareasonableminimum,bylimiting InUbuntu12.04,theoutputwillprobablybe:
thewriteactions.Withinreason,becausea noopdeadline[cfq]
modernSSDisalreadyprettywear
Whichmeans:cfqisactive,butnoopand
resistantbydefault.
deadlinearealsosupported.
Whenyouapplymytips,alifespanofmore
than10yearsshouldbeanormal
c.Nowtype(usecopy/paste):
expectationforyourSSD.Whichis
gksudoleafpad/etc/default/grub
considerablylongerthantheaverage
PressEnter.
lifespanofanoldfashionedplatterdisk.
Note:thesedirectionsareonlymeantfor Findthisline:
aSolidStateDrive(SSD),notforan
GRUB_CMDLINE_LINUX_DEFAULT="quiet
splash"
ordinaryconventionalharddisk!
Reservesevenpercentfor
overprovisioning
5.Overprovisioning(withorwithouta
dash)isatechniquethat'sbeingusedto
improvetheperformanceandlifespanof
anSSD.Iwon'texplainithere,butitboils
downtonotformattingapartoftheSSD,
whichthenremainsunallocatedspace
(unusedcapacity).

Andreplaceitbythisline:
GRUB_CMDLINE_LINUX_DEFAULT="elevator=dead
quietsplash"
d.Savethemodifiedfileandcloseit.
e.NowupdateGrubforthischange.Inthe
terminal(usecopy/paste):
sudoupdategrub
PressEnter.Typeyourpasswordwhen
promptedthisremainsentirelyinvisible,not
evendotswillshow,thisisnormal.Press
Enteragain.

Generalopinionusedtobe,thatit'swiseto
reserveasmuchas28percentofthe
storagecapacityofanSSDforsuch
unallocatedspace.That'sofcourseahuge f.Rebootyourcomputer.
sliceoutofthetotalstoragecapacity,which
g.Proceedtothenextitem.
makesnobodyhappy....
However,inthenewergenerationsof
SSD'sthetechnologyandfirmwarehave
improvedsomuch,thatsuchhugelosses
ofstoragecapacityaren'tneededanymore.
Notfornormaluse,anyway.

Note:whenyouhaveonlyanSSDinyour
computerandnoplatterdiskaswell,then
youmayexperienceaslightperformance
benefitbychoosingnoopforscheduler,
insteadofdeadline.

ButstillIadvisetoreserveaboutseven
percentforunallocatedspace.Fornormal
use,that'sareasonableminimum.

DoNOTenablehibernation

Seethescreenshotbelow(clickonitto
enlargeit):

15.Hibernationcausesahugeamountof
writeactions,whichisverybadforanSSD.
Makesureit'sdisabled!(item7,rightcolumn)
AlsoforanSSD:preventfragmentation,
andDONOTdefrag
16.ForanSSD,fragmentationofthefile
systemisasmallerproblemthanforordinary

rotatingharddisks.Butit'sneverthelessstill
aproblem,soit'susefultoprevent
fragmentationasmuchaspossibleonan
SSD,too.Youcanachievethatbypreserving
aminimumof20%freespaceoneach
partition.
Preventionisallthemoreimportant,as
defragmentingisoutofthequestionanyway:
yourSSDwouldwearrapidly,becauseofthe
manywriteactionsitcauses.
HowdoesitworkforanSSD?

6.Thebestfilesystem(formatting)foran
SSD,istheusualdefaultEXT4.Soyou
don'thavetochooseanythingdifferentin
thisrespect.

ThemechanicalseektimeofanSSDis
always0,regardlessofthefragmentation.
That'sabigdifferencewithrotatinghard
disks,onwhichtheseektimeincreasesas
fragmentationgrows.Thisisasignificant
improvement.Butmechanicalseektimeonly
makesupapartoftotalaccesstime,orI/O
time,ofanysingleinput/outputrequestmade
tothedisk.

ThejournalingthatcomeswithEXT4
causessomewriteactivity,butnotvery
much.Plusjournalingisaveryimportant
featureforsystemcrashrecovery,soyou
don'twanttodisableit.

I/Otimeisthetimeacomputersystemtakes
tocompletearequestcycle.Allthewayfrom
application,OSanddriverdowntodisk
hardware,memorycells,andthenback
again.

Duringinstallation:chooseEXT4

Aftertheinstallation:noatime
7.With"noatime"in/etc/fstab,youdisable
thewriteaction"accesstimestamp",that
theoperatingsystemputsonafile
wheneverit'sbeingreadbytheoperating
system.ForanSSD"noatime"ismuch
better.
Youcandothatasfollows:
a.Firstmakesurethatyouhaveinstalled
theapplicationsgksuandleafpad:

Zeromechanicalseektimecertainlydoesnot
meanzeroI/Otime.Nomatterhowfastan
SSDis,itsI/Otimecanneverbezero.File
systemfragmentationincreasesI/Otimein
anSSD,evenwhenthemechanicalseek
timeiszero.
Toputitanotherway:theperformance
degradationasaresultoffragmentationis
notcausedbythestoragedevicealone
(whetherthere'samechanicalmovingpartor
not),butit'salsoaproblemconcerningthe
systemasawhole.

Thetaskforthesystembecomesheavier,
whentherearemorefilestobechoppedup
ClickonthegreyUbuntulogo(Dashhome).
andmorepiecesoffilestobegluedtogether.
Query:terminal.
Theheavierthetask,thelongerthe
ClickonTerminal.
processingtime.
Type(orcopy/paste):
sudoaptgetinstallgksuleafpad
PressEnterandsubmityourpassword.
Pleasenotethatthepasswordwillremain
invisible,notevenasteriskswillshow,
whichisnormal.
b.Thentypeintheterminal(use
copy/paste):
gksudoleafpad/etc/fstab

Agoodandelaborateexplanationofthisfact
canbefoundhere.Websitedown?Here'sa
pdffile.
Dualboot?Don'tletWindowskillyour
SSD
17.DoyouhaveadualbootwithWindows?
Thendon'tletWindowskillyourSSDby

defragmentingit.
PressEnter.
c.Nowadd"noatime"tothelineforyour
rootpartitionandyourotherLinux
partitions.Nottothelinefortheswap
partition!
Anadaptedlinemaylooklikethis:
UUID=f0ae2c5983d242e781c4
2e870b6b255d/ext4
noatime,errors=remountro01
Note:thisisoneline,nottwo!Itmight
appeartobetwolines(dependentonyour
screensize),becauseofthelengthofthe
line.
d.Savethemodifiedtextfileandcloseit.
e.Nowproceedtothenextitem.
StillrelevantforUbuntu14.04andLinux
Mint17:automaticTRIMbyrc.local,by
cronorbydiscard
8.ThecleaningactionTRIMisnecessary
forthegoodperformanceofyourSSDin
thelongrun.Otherwiseit'llbecomevery
slowaftersometime.
AllmodernSSD'ssupportTRIM,butolder
SSD'sfrombefore2010usuallynot.Sofor
anolderSSDyou'llwanttocheckthison
thewebsiteofthemanufacturer.
It'seasiesttoletthesystemperforman
automaticTRIM.Thatcanbedonein
severalways.

DefragmentationwillkillyourSSDinavery
shorttime,becauseofthemultitudeofwrite
actionsthatitcauses.
WithinLinuxyoudon'thavethisproblem,
becauseLinuxfilesystemshardlyfragmentin
thefirstplaceandsodon'tneedtobe
defragmentedanyway.
EnjoyyourSSDcarefreeforyearsand
years
18.Nowyou'llbeabletoenjoyyourSSD
carefree!
Asalreadysaidinthestartofthishowto:
takingintoaccountthelongwarrantyperiods
thatthemanufacturersaregiving,yourSSD
willprobablylastformorethanfiveyears(10
yearsshouldbeareasonableexpectation).
Considerablylongerthananordinaryplatter
harddiskgenerallylasts,anyway...
Optional(advancedusers):temporary
filesandlogs
19.Thisisanadvancedsystemhack,and
muchlessimportantthantheothertweaks.
Soyoucansafelyskipit,ifyoudon'tfeelup
toit.
Youcanfurtherreducethenumberofwrite
actionstotheSSD,bymovingthetemporary
filesandthelogfilesofthesystemtoa
temporaryvirtualfilesystemintheRAM
memory.Thatvirtualfilesystemwillbe
destroyedwhenyoureboot.

Note:inUbuntu14.04andinLinuxMint
17TRIMisenabledautomatically,when
youinstallUbuntu14.04orLinuxMint17 Forthetemporaryfiles,thereareno
onanSSD.Namelybya"cronjob".
significantdisadvantagestothat,exceptthat
yourRAMmemorysizemustbelarge
Butthisdoesn'thappenautomatically
enough(preferablyatleast4GB).
forallSSD's.Furthermore,inmost
cases"cron"isnottheoptimalmethod
Alsoyoursystemlogfileswon'tbethere
forTRIManyway,soIadviseyoutoread permanently.Thereisasmallriskthatan
on.
applicationwillfailmysteriously,becauseit
hasnoaccesstopreviouslycreatedlogfiles.
Inpracticethisriskisverysmall.Intwoyears
Preferredmethod:byrc.local
ofintensiveuseofanetbookwithanSSD,it
neverhappenedtome.
8.1.YoucanaddtheTRIMcommandto
/etc/rc.local.Thenthiscommandwillbe
a.Firstmakesurethatyouhaveinstalledthe
executedautomaticallyonsystemboot.
applicationsgksuandleafpad.
Thishardlyslowsthebootprocessdown.
ThisisthemethodthatIprefer.
b.Thentypeintheterminal(usecopy/paste):

Youcandothatasfollows:
a.Firstmakesurethatyouhaveinstalled
theapplicationsgksuandleafpad.
b.Thentypeintheterminal(use
copy/paste):
gksudoleafpad/etc/rc.local
PressEnter.
c.Abovethelineexit0inthatfile,younow
addtheTRIMcommand
fstrimvforeveryautomaticallymounted
EXT4partition.
Note:notforpartitionsthataren'tmounted
bydefault!Andalsonotfortheswap
partition,asthat'salreadybeingtrimmed
automaticallybythesystembydefault,
duringthebootprocess.
Anexampleismostclarifying.Whenyour
Ubuntuisononesinglepartition,soyou
haveonlytherootpartition/,thenyour
rc.localshouldlooklikethis:
#!/bin/she
#
#rc.local
#
#Thisscriptisexecutedattheendofeach
multiuserrunlevel.
#Makesurethatthescriptwill"exit0"on
successoranyother
#valueonerror.
#
#Inordertoenableordisablethisscript
justchangetheexecution
#bits.
#
#Bydefaultthisscriptdoesnothing.
fstrimv/
exit0
Ifyouhaveaseparatehomepartition
(althoughthat'snotveryuseful),thenyou
addthefollowinglineaswell,aboveexit0:
fstrimv/home

gksudoleafpad/etc/fstab
PressEnter.
c.Addthefollowingbluelines,atthevery
endoftheexistingtextinthatfile(use
copy/pastetoavoiderrors):
#
#ModificationforSSD
tmpfs/var/logtmpfs
defaults,noatime00
tmpfs/tmptmpfs
defaults,noatime,mode=177700
d.Savethefileandcloseit.
e.Torestorethefolderstructurewithin
/var/logateachreboot,youaddsomelines
to/etc/rc.local,justabovethe"exit0"line.
Type(usecopy/paste):
gksudoleafpad/etc/rc.local
PressEnter.
f.Addthefollowingbluelines,justabovethe
line"exit0"inthatfile(usecopy/pasteto
avoiderrors):
#
#ModificationforSSD
fordirinapparmoraptcupsdistupgradefsck
gdminstallersambaunattendedupgrades
do
if[!e/var/log/$dir]then
mkdir/var/log/$dir
fi
done
g.Closethefileandsaveit.
Note:yoursystemnotonlyhasthefolder
/tmp,butalsothefolder/var/tmp.Don'tput
thislastfolderintheRAMmemory,because
/var/tmpismeantfortemporaryfilesthat
havetobeavailableafterreboot.Iissuethis
warningbecausesomeothermanualsfor
SSD's,wronglyadvisetoinclude/var/tmpin
theRAMaswell....

Note:ifyouhaveaseparatepartitionfor
/boot/efi,don'taddatrimcommandlinefor
thatinrc.local.It'suseless,asthatpartition
isseldombeingwrittento.Anditmayeven
causemalfunctions.

h.Rebootyourcomputer.

d.Savethemodifiedfileandcloseit.

Doyouwantmoretipsandtweaksfor
Ubuntu?There'salotmoreofthemonthis
website!

e.Rebootyourcomputer.

Wantmore?

Disablethesuperfluousweeklycronjob
forTRIM
8.1.1.InUbuntu14.04,disablethenow
superfluousweeklycronjobforTRIM:
Copy/pastethefollowingcommandlineinto
theterminal:
sudomvv/etc/cron.weekly/fstrim/fstrim
PressEnter.
Withthatcommandyou'vetransferredthe
scriptfilefstrimtotherootdirectory,thus
disablingit.
Nowproceedtoitem9.
Onlyforcomputersthatarealwayson:
bycron
8.2.Forcomputersthatarealwayson(24
hoursaday,sevendaysaweek),aTRIM
actionthat'sbeingexecutedwhenbooting,
isofcoursenotuseful.Insuchacase
you'rebetteroffwitha"timer",i.e.withcron.
Youcandothatasfollows:
a.Firstmakesurethatyouhaveinstalled
theapplicationsgksuandleafpad.
b.Thentypeintheterminal(use
copy/paste):
gksudoleafpad/etc/cron.daily/trim
PressEnter.
c.Copy/pastethefollowingtextintothat
emptytextfile:
#!/bin/sh
#callfstrimalltotrimallmountedfile
systemswhichsupportit
sete
#
#ThisonlyrunsonIntelandSamsung
SSDsbydefault,assomeSSDswith
#faultyfirmwaremayencounterdataloss
whenrunningfstrimunderhighI/O
#load(e.g.
https://launchpad.net/bugs/1259829).You
canappendthe
#nomodelcheckoptionheretodisable
thevendorcheckandrunfstrimon
#allSSDdrivesLikethis(removethe
hash):
#execfstrimallnomodelcheck

TothecontentofthiswebsiteappliesaCreative
Commonslicense.

Backtothehomepage
Disclaimer

execfstrimall
Savethetextfile.
d.Nowcopy/pastethefollowingcommand
intotheterminal,inordertorenderthefile
executable:
sudochmod+x/etc/cron.daily/trim
PressEnter.Typeyourpasswordwhen
promptedthisremainsentirelyinvisible,not
evendotswillshow,thisisnormal.Press
Enteragain.
e.Rebootyourcomputer.
Ubuntuwillnowperformthedailycronjob
automatically,at06:25,or(whenthe
computerisn'tonatthattime),
automaticallyatalatertimeonthesame
day.
f.Nowproceedtoitem9.
Notadvised:bydiscard
8.3.Anotherwidelyusedmethodfor
automaticTRIMistoaddtheoptiondiscard
to/etc/fstab,forthelineforyourroot
partitionandforpossibleotherLinux
partitionsthatarebeingmentionedthere.
Note:donotaddittothelinefortheswap
partition,asthat'salreadybeingtrimmed
automaticallybythesystembydefault,
duringthebootprocess!
Thedisadvantageofthismethodis,thatit
maycausethesystemtoslowdown.
BecauseitforcesthesystemtoapplyTRIM
instantlyoneveryfiledeletion.That'swhy
thismethodisnotmyfavourite.
Ifyouwanttodoitanyway,thenthisis
how:
a.Firstmakesurethatyouhaveinstalled
theapplicationsgksuandleafpad.
b.Thentypeintheterminal(use
copy/paste):
gksudoleafpad/etc/fstab
PressEnter.
c.Nowadd"discard"tothelineforyourroot
partitionandyourotherLinuxpartitionsthat
arebeingmentionedinthisfile.Nottothe
linefortheswappartition!

Anadaptedlinemaylooklikethis:
UUID=f0ae2c5983d242e781c4
2e870b6b255d/ext4
discard,errors=remountro01
Note:ifyouhaveaseparatepartitionfor
/boot/efi,don'taddatrimcommandforthat
partitioninfstab.It'suseless,asthat
partitionisseldombeingwrittento.Andit
mayevencausemalfunctions.
d.Savethemodifiedtextfileandcloseit.
e.Rebootyourcomputer.
f.Nowproceedtotitem9.
Note:asalreadymentioned,oldSSD's
madebefore2010usuallydon'tsupport
TRIM.Inthatcase,donotapplytheoption
discardinfstab.
HowtoexecuteTRIMmanually
9.YoucanexecuteTRIMmanuallyaswell,
namelyasfollows:
ClickonthegreyUbuntulogo(Dashhome).
Query:terminal.
ClickonTerminal.
Type(usecopy/paste):
sudofstrimv/
PressEnter.Typeyourpasswordwhen
promptedthisremainsentirelyinvisible,not
evendotswillshow,thisisnormal.Press
Enteragain.
Thisoperationmaylastforminutesitthen
looksasiftheterminalhasfrozen.That's
nottrue,howeversimplywaitpatiently....
Theaboveterminalcommandisenough
whenyouhaveonlyoneUbuntupartition
andaswappartition(becausefortheswap
it'sunnecessarythesystemtakescareof
thatautomatically).
WhenyouhavemoremountedEXT4
partitions,you'llhavetoadaptthe
commandlineaccordingly.Forexample,if
youhaveaseparatehomepartition
(althoughthat'snotveryuseful),thenthe
commandis:
fstrimv/home
Nowproceedtothenextitem.

(continuedinthecolumnontheright)

Comentarios
Notienespermisoparaaadircomentarios.

Iniciarsesin | Informardeusoinadecuado | Imprimirpgina | Conlatecnologade GoogleSites

You might also like