Author Topic: Pdaxrom, 3100 & Swap  (Read 4249 times)

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Pdaxrom, 3100 & Swap
« on: November 03, 2005, 04:13:11 pm »
I recently installed pdaXrom on my 3100, but reformatted my HD into one ext3 partition. I ran into a situation where my Z crashed as I purposefully pushed it as hard as I could and it destroyed my mycalendar.ics files. Is there a swap file somewhere else, or should I repartition and make one, or is it possible to mount a directory as a swap file so it's dynamic in size?
- If I have to repartition I would like to do it now before I customize too much.
SL-3100, pdaXrom

T-RuX

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #1 on: November 03, 2005, 04:18:25 pm »
Hi! You can do a file and use this for swap
Do iT:
# dd if=/dev/zero of=swapfile bs=1M count=[the megabytes what you like...]
# mkswap swapfile
and you have a new swapfile... you can mount it with #swapon swapfile and umount with swapoff swapfile
easy

Chao!

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #2 on: November 03, 2005, 05:05:31 pm »
Quote
you can mount it with #swapon swapfile and umount with swapoff swapfile
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102141\"][{POST_SNAPBACK}][/a][/div]

This is great!
« Last Edit: November 03, 2005, 05:47:30 pm by Sheila »
SL-3100, pdaXrom

jcabrer

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #3 on: November 03, 2005, 07:27:42 pm »
Quote
Quote
you can mount it with #swapon swapfile and umount with swapoff swapfile
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102141\"][{POST_SNAPBACK}][/a][/div]

This is great!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102146\"][{POST_SNAPBACK}][/a][/div]

If you are at all interested in the best preformance, a swap partition is faster than a swap file.  Granted, it does not give you the flexibility as far as changing things later on, but if you create a 512MB swap, I doubt you will ever need anything bigger.
Sharp SL-C3100 - pdaXrom Beta 3
Sharp SL-6000L - pdaXrom Beta 1

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #4 on: November 03, 2005, 08:06:11 pm »
Quote
If you are at all interested in the best preformance, a swap partition is faster than a swap file.  Granted, it does not give you the flexibility as far as changing things later on, but if you create a 512MB swap, I doubt you will ever need anything bigger.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102163\"][{POST_SNAPBACK}][/a][/div]
I'm going to setup a script to make a temp file when necessary. I think I'll rarely need it, and I'm really not that keen on losing all the HD space for something I won't use that often. If I'm using a swapfile anyhow, I recognize the performance is subpar anyhow...
SL-3100, pdaXrom

jcabrer

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #5 on: November 03, 2005, 08:55:46 pm »
Quote
Quote
If you are at all interested in the best preformance, a swap partition is faster than a swap file.  Granted, it does not give you the flexibility as far as changing things later on, but if you create a 512MB swap, I doubt you will ever need anything bigger.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102163\"][{POST_SNAPBACK}][/a][/div]
I'm going to setup a script to make a temp file when necessary. I think I'll rarely need it, and I'm really not that keen on losing all the HD space for something I won't use that often. If I'm using a swapfile anyhow, I recognize the performance is subpar anyhow...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102170\"][{POST_SNAPBACK}][/a][/div]

also be aware that a swapfile *MUST* be contiguous (no fragments).  In other words, the swap file you create on a partition already populated with files can only be as large as your biggest free area on the partition.  Of course you can also create multiple smaller swapfiles to compensate.
Sharp SL-C3100 - pdaXrom Beta 3
Sharp SL-6000L - pdaXrom Beta 1

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #6 on: November 04, 2005, 02:53:14 am »
Quote
Quote
Quote
you can mount it with #swapon swapfile and umount with swapoff swapfile
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102141\"][{POST_SNAPBACK}][/a][/div]

This is great!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102146\"][{POST_SNAPBACK}][/a][/div]

If you are at all interested in the best preformance, a swap partition is faster than a swap file.  Granted, it does not give you the flexibility as far as changing things later on, but if you create a 512MB swap, I doubt you will ever need anything bigger.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102163\"][{POST_SNAPBACK}][/a][/div]
How do you create this partition on the Zaurus with the CF in? Do I have to fdisk or something and reformat the whole card?

And can you say percentage wise how faster would having a 512MB swap partition be in comparison with a 512MB swap file, i.e. is it worth it, or is the difference 0.5% or something?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Pdaxrom, 3100 & Swap
« Reply #7 on: November 04, 2005, 04:47:04 pm »
Quote
also be aware that a swapfile *MUST* be contiguous (no fragments).  In other words, the swap file you create on a partition already populated with files can only be as large as your biggest free area on the partition.  Of course you can also create multiple smaller swapfiles to compensate.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102177\"][{POST_SNAPBACK}][/a][/div]
Hmmmmmmmmmmmmmm, is there a command line tool that can tell me how big any contiguous free area on my HD is? Even if I had that information, would making a file automatically use that space, or might the swapfile I make still be fragmented?
Would a fast SD card (which would be easier to reformat) give as good performance as the MicroDrive?
I've always followed suggestions that a swap file should be 2X the available RAM. Would it be a complete waste of time to make a 128MB swap file? A 50% increase I figure should be plenty... I infer from your post, I could then, if I needed, create multiple smaller swapfiles. Do I just run swapon specifying various partitions and created swapfiles? i.e. I don't have to add a numerical suffix anywhere?
Thanks for this very useful info.   I thought SD prices would be way cheaper by now!
« Last Edit: November 04, 2005, 04:48:22 pm by Sheila »
SL-3100, pdaXrom