WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /dev/shm: where is it mounted? and where is swap?  (Read 7421 times)

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
/dev/shm: where is it mounted? and where is swap?
« on: December 11, 2011, 07:00:56 AM »
Hi all, i start Tiny Core from my dos partition with linld; i use a ext2 format partition as "opt", "tce" and "home" persistent. As well as i understand, Tiny core load root partition on ram (i have 760Mb) and the rest on hd; however when i type "mount" and then press enter i see mounted also a "/dev/shm" but i am not able to understand where it is mounted.............. so, as the same, if i select "swap" or "swapfile" kernel parameter, i see swap mounted (190Mb) on "/dev/ram0" (if i remember well) by tiping "free"" but also in this case i am not able to understand where it is.................... I would want to use a real swapfile as swap (no partition) by making:
dd if=/dev/zero of=swapfile bs=1024k count=512
then:
mkswap swapfile

Can anyone help me?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #1 on: December 11, 2011, 07:56:54 AM »
Both /dev/shm and zram0 are in ram. If you're asking where they get mounted, that'd be /etc/init.d/tc-config.

edit: If you want to manually mount your swapfile, the swapon command would go to /opt/bootlocal.sh. Alternatively, use the swapfile tool to create it and the swapfile=hda3 bootcode.
« Last Edit: December 11, 2011, 07:59:36 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #2 on: December 11, 2011, 09:34:26 AM »
Thanks. Therefore, i ask my self if is it better a swap file, a swap partition or a swap ram, as well as tiny core make............... Why does tiny core set to 192Mb it? And why does shm set to 360mb?
As well as i see, my 760 mb ram memory as divided in 192Mb swap, 360Mb shm and 760-(360+192)=208 root directory "/"................Is it right?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11589
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #3 on: December 11, 2011, 09:52:25 AM »
Hi zemir
My personal opinion is if you have a hard drive you are probably better off putting the swap on it
and leave more RAM available for your applications. I don't know if it makes any difference whether
you use a swap file or a swap partition. The 192Mb is simply the default Tinycore uses which is
25 percent of the system RAM.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #4 on: December 11, 2011, 10:17:09 AM »
Hi all, i start Tiny Core from my dos partition with linld; i use a ext2 format partition as "opt", "tce" and "home" persistent. As well as i understand, Tiny core load root partition on ram (i have 760Mb) and the rest on hd; however when i type "mount" and then press enter i see mounted also a "/dev/shm" but i am not able to understand where it is mounted.............. so, as the same, if i select "swap" or "swapfile" kernel parameter, i see swap mounted (190Mb) on "/dev/ram0" (if i remember well) by tiping "free"" but also in this case i am not able to understand where it is.................... I would want to use a real swapfile as swap (no partition) by making:
dd if=/dev/zero of=swapfile bs=1024k count=512
then:
mkswap swapfile

Can anyone help me?
I personally made a swap partition on my hdd. It is recognized automatically at boot (no boot code swap="sdax").
And I use the nozswap boot code.
But in fact: I have enough RAM for the small applications I run (I cannot run big ones due to my small processor power) and a swap is not mandatory in my case.
Finally, from what I understood in this post, I would use the bootcode nozwap.
In case you come to your ram limits, create a swap on your HDD.
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #5 on: December 12, 2011, 08:17:02 AM »
Thanks. Therefore, i ask my self if is it better a swap file, a swap partition or a swap ram, as well as tiny core make............... Why does tiny core set to 192Mb it? And why does shm set to 360mb?
As well as i see, my 760 mb ram memory as divided in 192Mb swap, 360Mb shm and 760-(360+192)=208 root directory "/"................Is it right?

They (shm, zram) aren't away from your ram until they are used. The root is set at 90% of your ram.
The only barriers that can stop you are the ones you create yourself.

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Re: /dev/shm: where is it mounted? and where is swap?
« Reply #6 on: December 12, 2011, 08:53:10 AM »
i think swap file is more better that swap partition, especially on laptops/notebooks; you can resize it as well as you want more fast, more sure and more quickly respect swap partition; and its performances depend from file system performances (ext2 is yet good on laptops)............ i think to make this choice.................for the rest, thanks!