View: 7389|Reply: 3

Swap file ubuntu vivid #solved

[Copy link]

6

threads

35

posts

291

credits

Intermediate member

Rank: 3Rank: 3

credits
291
Published in 2015-11-7 20:25:23 | Show all floors |Read mode
Edited by adheybgz at 2015-11-8 10:04

hey guys ,. how to add / create a swap file  ..? im always getting out of memory .  facebook and youtube and some downloads it consume 90% of ram   im using ubuntu vivid from loboris.

6

threads

35

posts

291

credits

Intermediate member

Rank: 3Rank: 3

credits
291
 Author| Published in 2015-11-8 09:32:35 | Show all floors
Edited by adheybgz at 2015-11-8 09:45

ok , it solved now

i use this vodoo command

$ dd if=/dev/zero of=/path/to/swapfile bs=1M count=1024 # For 1GB swap file
$ mkswap /path/to/swapfile
$ swapon /path/to/swapfile


Voila it works
thanks guys



This thread contains more resources

You need to Log in to download or view,No account?    Register

x

1

threads

4

posts

37

credits

Novice

Rank: 1

credits
37
Published in 2016-1-11 17:39:06 | Show all floors
I think that needs some improvements.  The swap file should really be owned by root, and located in the root directory "/".

To create the file with zero size in / :
$ sudo touch /swapfile
Then :
$ sudo dd if=/dev/zero of=/swapfile bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 64.1348 s, 8.4 MB/s
$ sudo mkswap /swapfile
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=312d835c-759d-4d5c-8c60-2ac4e6bf7117
$ sudo swapon /swapfile
$

After rebooting you will have to make the file the swapfile again :
$ sudo swapon /swapfile
$

To check it is the swapfile :
$ sudo swapon --summary
Filename                Type        Size    Used    Priority
/swapfile                     file        524284    0    -1
$

6

threads

9

posts

49

credits

Novice

Rank: 1

credits
49
Published in 2016-12-17 16:04:42 | Show all floors
palloy replied at 2016-1-11 17:39
I think that needs some improvements.  The swap file should really be owned by root, and located in  ...

hi dear friend .
i want compile a source files on orange pi one. but i have error "cc internal compiler error"
i think this is related to RAM . can you help me ? i am beginner . can i increase ram ? please help me

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list