You are not logged in.

#1 2006-10-07 03:14:42

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Extended memory with swap in ARCH (swap to 30GB)

When employing large "swap" partitions, say, 10GB total, it is possible to utilize tmpfs to enable loading data to partitions of this size as an extension of ram.  I discuss the use of USB swap in particular.

However, when the swap is thusly utilized, it must be unloaded during reboot.  If the entire 10GB is utilized the job of unloading swap requires a long unload time.

It is understood that swap is "paged" in and out on a priority basis.  At some point, the swap "paging" would reach a limit due to the needs of the system.  Thus, new data following that point being reached, would enter swap directly I surmise????


It is possible to utilize several swap partitions via the priority assigned in /etc/fstab as is illustrated below;

     /dev/sda2  none swap  sw,pri=4    0  0  #any number for pri (limit very high)
    /dev/sdb2   none swap  sw,pri=4    0  0
    /dev/sdc2   none swap  sw,pri=4    0  0 # all same priority

This provides the parallel use of three swap partitions on three devices to effectively increase the speed of transfer by nearly three(three swap partitions in parallel).  (Writer is not certain if each partition has to be of same size)?

The problem posed about the unloading of swap(takes a long time to unload 10GB) begs a new question.  Does the parallel setup continue to provide triple speed during the unloading occuring during reboot?

Is there a fast unload sequence available in archlinux before reboot is begun?

What might occur if the swap devices (flash) are removed, either singly or in one cli command? (Is ther such a command?)

What happens if one of the devices is disconnected during system functions?

Not having the need for swap (3GB ram) until experimenting with large swap partitions and large files, I have no "expert" understanding of its consequences.

Answers to my queries should elucidate the swap mechanism for all interested users.

EDIT:  It would seem that a swapoff CLI would begin the process of "unloading" swap and hopefully at the higher speed provided by the priority mechanism, assuming that it is unloaded rather than merely disconnected........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2006-10-07 14:11:05

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Extended memory with swap in ARCH (swap to 30GB)

Hi!

swap/virtual memory does nothing good unless you like to keep idle apps open, which would give more RAM for cache or other better use.

swap is not a solution for lack of RAM because your system will screw up when running out of RAM anyway. The recommendation saying 2x/3x swap than memory is completely baseless and bulls**t.

Offline

#3 2006-10-07 14:26:49

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Extended memory with swap in ARCH (swap to 30GB)

To answer your real questions: tongue
· multi-swap partitions won't help much. The speed of RAM is hundreds or thousands of times faster than disk/flash, so it wouldn't matter unless you have like 100 SCSI hds for 100 swap partitions.
· If a device is removed by force during system function, bad thing will happen wink
· If your app has to be constantly swap in/out in order to work, your system is screwed up - in that case, you would wish there is no swap at all and the system could just kill the app which hogs memory.
PS: Most users should, depending on your RAM, either completely disable swap or keep 200 or 300MB by some swap file (no reason to waste partition entry)

Offline

#4 2006-10-07 16:37:53

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

aquila_deus;

I appreciate your reply concerning the use of swap.

The activity I employ swap within is one which requires more than the 3GB of ram memory which is installed in my system.

The procedure being experiemnted with is a LiveDVD within archlinux which is being operated copied-to-ram.

The data being installed extends the memory required to ~6GB, thus swap memory is imperative.

I agree that swap memory is slow compared to ram but nonetheless permits the process to be employed.

In googling, I find the /etc/fstab procedure available to enable priority programming of several swap partitions which increases the speed of transfers by running them in parallel.

I have not been advised that such procedure is not valid.

In googling, I find that kswapd daemon monitors swap use to ensure the system has enough physical memory to perform critical functions.

With that in mind, it would seem that swap could be disconnected and the system could continue to function, although with diminished access to swapped pages.  Thusly, swapoff command could be initiated...begs the question...What happens to the priority swap partitions when swapoff is entered?  Do they immediately shut down or are they unloaded?  If they immediately shut down, the data remains intact and will reinitiate if subsequently the swapon command is issued.  In the interim, conditions within the system should show resultant changes in performance.

While using the LiveDVD in arch, I have utilized copy-to-ram and have employed mounted tmpfs to enter greater than 3GB of data in my system (enabling tmpfs with 10GB), and find that the system responds with swap use.  While operating with approximately 6GB of total ram + swap, the system did not slow down and permitted multi-tasking, internet access and video display, mp3 play and KDE system guard display simultaneously.  Thus, the entire system operated in ram and extended swap, probably swapping to ram from the mounted tmpfs directory into which the added data was entered.

The swap system utilizes LRU priority(least recently used) to decide which pages to swap: the new data is not considered LRU since it hasn't been paged as yet.

In utilizing tmpfs in this manner, the original tmpfs provided by the LiveDVD install remains untouched by the added data in the new tmpfs directory of 10GB and establishes whatever functions are required by the system.

This activity is without question an experiment and seems to have some merit in its results.  The data added to tmpfs directory enters the swap area at some point in the procedure and is read out when required by program needs.  The exact nature of the swap data is problematic and it may be different every time the system is used to utilize another element within it.

In my experiment, everything is in ram(or extended by swap).  It may be pertinent to consider that factor when deciding that swap= 3 x ram is not good practice.

The several questions I have posed are the reason for this posting such as to better understand the ramifications of large swap use.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2006-10-08 19:09:03

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Continuing the experiment;

Using HDD USB/IDE with two 4GB partitions assigned to swap, I was able to load 8GB (230MB in HDA) and operate in LarchDVD at normal speed while copied-to-ram.

Copying the 8GB of data proceeded at varying transfer rates after reaching ~4GB.  The initial rate was 34MB/sec dropping to a low of ~10MB/sec and ending at~ 15MB/sec.

The transfer was made from hda3 to the mounted /mytmpfs directory and monitored in ksys guard for performance.  Thus, the free memory was monitored during the transfer.

Free memory displayed ~98MB after the 3GB physical ram was exceeded in the transfer of data.  This level was maintained by kswapd during the remainder of the 8GB transfer.

After the transfer was completed, hda3 was unmounted and system performance checked via pacman download of mplayer, play video 1GB file, connect to archlinux.org in konqueror, and search forums.

Since all is in ram, the speed of activities in the operating system is excellent.  Whether swap is encountered during a given operation is problematic since the exact content of swap is not known due to the nature of the linux kernel and arch OS handling of swap.

At one point, I loaded a 1GB file into /mytmpfs, having deleted the 8GB data, and determined the swapoff performance.  The swapoff command produced a result indicating that the system removes swap data in a controlled fashion (setup by the paging system in Linux) until the swap is emptied.

Since operating system parameters are impacted with swap use in this experiement, any interruption of the swap operation (say, hdd fail or operator error) will most certainly result in system failure to respond.  This has occured  in my experiments but no damage results because the system is Live in ram. 

If one was to try this arrangement in normal arch boot, the possible loss of system parameters in swap might cause loss of reboot of the system.

Continued tests;

Attempted to utilize hda2 swap of 230MB together with 4GB of USB flash drive.  Utilizing hda3 file of ~6GB, copy to /mytmpfs, the loading proceeded at 34MB/s until ~4GB was transferred.  The transfer rate then dropped to near zero and remained below ~1MB/s and remained at that level.  Thus, the use of flash drive seems unlikely to produce a satisfactory swap function.

However, it may help to add a parallel system of flash units, to gether with the hda2, by assigning priority in /etc/fstab.

After modifying fstab, the system was tested with ~6GB of transfer data which indicated 34MB/s until ~4GB was transferred, thereinafter fell to the same ~1GB/s rate.  Thus, the parallel system arrangement did not produce a higher rate of transfer.  Indicators on the flash devices showed activity on three devices.

Not being an expert on flash drives, it is possible that the use of such devices in a swap situation is not a viable option, due to the mechanism employed in the USB/flash drive device(s).  (Nand versus Nor devices producing different operating characteristics.)

Thus, the experiment indicates that USB HDD devices used as swap in Live copy-to-ram boot are useful in extending the ram via swap.

Test of parallel  USB HDD devices in swap has not been performed.  I have only one USB/IDE interface device.  Perhaps santa claus will provide a second?

Use of USB flash drives to load into /mytmpfs while using USB HDD as swap will be the next experiment.  This utilizes flash drives in a normal manner with perhaps 20mb/s transfer rate.  Each element in this arrangement will be on the usb interface, all 2.0 USB. Performance in this arrangement may be impacted.......

:?
Hoping these experiments are of interest.....


:


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2006-10-08 23:37:34

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Extended memory with swap in ARCH (swap to 30GB)

I don't think using flash memory for swap or tmpfs is a good idea, since writing to it wears it out...

Offline

#7 2006-10-08 23:55:07

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Experiment continued;

Loaded 1.6GB of mp3's and 2,7GB of video files into  USB 4GB flash drive pqi(speed varied with content, much at 10MB/s).

Booted into Larch DVD copy-to-ram with 8GB swap in USB HDD. 

Generated /mytmpfs and mounted as 10G in size.

Copied the 4GB pqi flash data into /mytmpfs, variable speed indicated in ksys guard display but averaged near 15MB/s.

Resulted in 2.236GB used in physical ram, 879KB free.

Resulted in 2.22GB used in swap with 6.2GB free.  Total ram + swap=~4.5GB

Downloaded mplayer via pacman and played mps files from /mytmpfs in mplayer.  In fact, played three at the same time (USB audio in use) !  Can't accept the result as music!!!!! lol
Also played a video file included in /mytmpfs as well as an mp3 simultaneously with some difficulty in following the story line!!!! lol

While operating in this fashion, ksys guard indicated changes occuring in all categories of physical ram and swap.

Was able to use konqueror to connect to arch linux forums during these exercises.

Finally,I rebooted.  During reboot, swap deactivation took ~5 minutes.

The system responds quickly while in ram, even with swap in use via USB hdd.  The loading of pqi 4GB seemed slow (occuring before booting to Larch Live DVD).

Normal speed in transfer to /mytmpfs while in ram seemed to be normal with the variations in transfer time affected by swap operations occuring within the OS and are problematic in that respect.

Running large swap in this manner reveals operating details not normally encountered.

Until I get a chance to try parallel swap partitions, I rest my efforts with partial success and a better understanding of the swap-OS-Linux interface..LRU,TLB,MMU,PAGING,swapout, swap-in among other elements kswapd and SIGSEGV(page fault).  A very intricate two-to-three way OS functional arrangement encountered in spades with large swap!!!

And it works!!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2006-10-09 01:35:42

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Gullible Jones;

Right!

I am aware of the limitations of flash at this point in their development due to the state of the art at present.  I expect, like Moore's law, the competitive nature of electronic ventures will improve the performance in years to come.  In the meantime, I investigate the applications possible regardless of the consequence(s).

Not all things are possible but possibilities abound...

Latest test involved no SD card(s) but only flash drives, 1GB patriot, 2GB memorex(both USB2.0) together with hda2 of 230MB all of same priority.  The transfer of 3.3GB of data into /mytmpfs from hda3 created a swap in use of 2.3+GB and the speed of transfer was mostly at 5MB/sec although started at 35MB/s until swap reached near 1GB.  OS managed swap operations reduced the transfer rate steadily after the initial 1GB of swap, mostly running at 5MB/sec as indicated by the transfer window.  Both flash drives indicated activity.

The performance of these flash drives was better than the combo utilized previously which included an SD card of 2GB with a 2.0 adapter.

Deactivation during reboot took 5 minutes as was true before.

Only thing new is that drive selection may improve the transfer speed, (may), but the OS handling of swap is paramount after the ram is exceeded.

I expect better performance when using paralleled HD swap partitions on two or more drives, preferably on the USB bus.  Just programming one more drive in USB would provide one swap source in primary HD and two in USB paralleled.

Need another USB/IDE device!

Onward!!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#9 2006-10-09 03:04:54

rawfuzz
Member
Registered: 2006-10-07
Posts: 16

Re: Extended memory with swap in ARCH (swap to 30GB)

If you don't have swap space, then anonymous mappings can't be flushed. They have to stay in memory until they're deleted. The kernel can only obtain clean memory and free memory by flushing out file-backed pages: programs, libraries, and data files. Not having swap space constrains and unbalances the kernel's page allocation. However unlikely it is that the data pages will be used again — even if they're never used again — they still need to stay in memory sucking up precious RAM. That means the kernel has to do more work to write out file-backed pages, and to read them back in after they're discarded. The kernel needs to throw out relatively valuable file-backed pages, because it has nowhere to write relatively worthless anonymous pages.

Not only this, but flushing pages to swap is actually a bit easier and quicker than flushing them to disk: the code is much simpler, and there are no directory trees to update. The swap file/partition is just an array of pages. This is another reason to give the kernel the option of flushing to swap as well as to the filesystem.

Offline

#10 2006-10-09 04:56:04

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

One more shot!;

Loaded 5.4GB package into /mytmpfs while booted into Larch.  This package consisted of most of current,extra and community .pkg.tar.gz.packages.

I entered selected packages with:

   pacman -Ud (click and paste from /mytmpfs)

I timed the install of :

    Openoffice-base=27 secs
    nexuiz=29 secs
    mozilla-firefox=2 sec   
   seamonkey = 4 secs
    mplayer=1+ secs

End of exercise................


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2006-10-09 08:15:15

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Extended memory with swap in ARCH (swap to 30GB)

rawfuzz wrote:

flushing pages to swap is actually a bit easier and quicker than flushing them to disk: the code is much simpler, and there are no directory trees to update. The swap file/partition is just an array of pages

Really? If I have a disk partition with a file system and a swap partition then by far the slowest link in the chain is moving disk heads between the two partitions.

You may get quicker service in an out-of town store, but it means a dedicated trip. If you're shuttling about within the town, it's quicker to shop in in the centre and queue just a bit longer as you're going past it often anyway.

Offline

#12 2006-10-09 22:46:59

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Added experiment that may yield better results:

Try IEEE1394 external drive connection with swap files in the drive.

Also, who can try external ATA drives in either USB 2.0 or IEEE1394?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#13 2006-10-10 04:03:24

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Extended memory with swap in ARCH (swap to 30GB)

lilsirecho wrote:

Added experiment that may yield better results:

Try IEEE1394 external drive connection with swap files in the drive.

Also, who can try external ATA drives in either USB 2.0 or IEEE1394?

no point trying external hard drives. they're going to be no different, if not slower than an internal hard drive -- as that's all they are, in a usb/fw enclosure.

James

Offline

#14 2006-10-10 05:24:30

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

I agree they are slower than internal drives but the question to be answered is based on my understanding that paralleled swap drives are faster.

The request may not have been stated clearly although I assumed the reader had read all the posts and recognized the parallel possibilities.

It may be a poorer approach than internal swap but keeps the heat outside the computer and uses external power as well.

In hopes that parallel swap partitions in two or more external drives will increase the transfer rate, however, the  kernel-linux swap system performance may be more of an impact on transfer speed than the speed inherent in multiple drive partitions.  Can't say for sure until it has been implemented.

Sorry that I wasn't more succinct in stating my request.  It is based on not having two external drives available at my computer for a simple swap test.

Agree that 1394 has about the same as USB2.0 in external USB/1394 units since I tried same long ago.  But if a user willing to try multiple drives with swap has a 1394 interface, it should be possible to employ it as well as a USB2.0, even both at the same time(with two units).

Experiments can bring results, some good. some bad. 

I would assume in using the technique, priority must be assigned identically to each drive involved.  It isn't clear in my understanding that if priority isn't assigned , the drives would handle swap in drive number order even though no priority is an equal assignment to such drives.

Anyhow, the external drives can be assigned top priority as outlined in previous post.

Not certain of optimum utilization of the params in this experiment but haven't given it a full trial either.

Hopefully, in a fewyears, the flash drive will be improved with improved techniques and it will then be more applicable for the use as external swap(power savings).

One of my experiments utilized 5.4GB of arch .pkg.tar.gz which enabled very fast install of packages.  The packages thusly provided could easily be upgraded via pacman-unionfs on a custom basis in the Larch copy-to-ram boot.  After use, pacman can be utilized to remove same, slimming down the operating system.

External swap can be turned on after boot as desired. 

Memory management can be utilized by the user before reboot to speed up the clean-up of swap drives.  This consists of deleting the items placed in /mytmpsfs, emptying the trash.


I see it as worth a try with nothing that can happen to the system since it is Live Larch.

I am pleased to hear from you, Iphitus.
big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#15 2006-10-10 07:55:14

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

While this experiment being reported is not the external swap only that I desire, it may indicate that parallel swap is working, although not assured due to inadequate data transfer.

I programmed another drive with qtparted (a win98 drive) placing linux-swap in two partitions each of 4GB.

The total swap available with this addition was over 16GB, half in primary slave drive and the other in USB 2.0 drive.

I transferred 9.4GB of data iinto  /mytmpfs directory including 5.9GB of pkg.tar.gz, and loaded mplayer via pacman -Ud mplayer.  Video played normally.

The situation at that time , after unmounting hda3 from whence came the transfers, showed
784416KB free in physical ram, 8563980KB used in swap with 8052596KB free in swap.

The transfer speed was variable in the transfer window from 18MB/S to 28MB/S with the majority of the material moving at 22 to 24MB/S.  This set of figures applies to the performance after reaching 1.7GB in swap.  Prior to that point 35MB/S  which varied slowly down to 15MB/S.

Transfer rate increased with the next data (VOB) from 18 to24MB/S during the activity. The remaining material of 5.9GB of tar gz transferred at 22MB/S to 27MB/S throughout the transfer.

I modified fstab to assign the same priority to these swap devices, deprecated the hda drive to lower priority (230MB swap partition).

I surmise I need to extend the data beyond the present 8.5GB as reported in order to ensure that both drives are indeed involved.  It seems possible that the hdb swap drive of 8GB might have been the only swap partition utilized.

Back to the drawing board to load another big file!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#16 2006-10-10 08:56:11

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

After loading the Larch with swap and copy-to-ram, I verified that 16GB+ of swap was present.  To ensure that the priorities would be set correctly, I turned swapoff.  I then set the priorities for all swap partitions in fstab, making the four 4GB partitions as highest priority.

I set up /mytmpfs, mounted same and started transfer of data from hda3. The limit in that directory was 10GB.

First data was the larch.iso of 5.9GB which loaded initially at 35MB/S and varied slowly to 18MB/S at 50% of transfer and built up slowly to 32MB/S at55% and stayed between 23 and 31MB/S for the rest of the transfer.  There were times when the speed indication stalled but data was being transferred, probably caused by swap activity related to its function.

The activity light on the external drive indicated it was actively involved, verifying that parallel operation was occuring.

Next I transferred the 5.9GB packages file which entered ar 22 to 32MB/S until the /mytmpfs file reached its 10GB maximum, stopping the transfer activity before the full transfer occured.  This verifies that the data obtained and limits imposed are both accurate.

I am addressing the forum from this successful boot of 10GB at decent transfer rates which includes 3200 packages from arch repositories, easily entered into the system with pacman as desired.

The last posting when rebooted took 40 seconds to deactivate swap, verifying the procedure used to reduce swap use before reboot.

The present figures for physical memory are 2.35GB used 760MB free, swap figures are 9.572116KB used , 7044460KB free.  These figures apply after the unmount of hda3.

I am anxious to experiment with two external drives for comparison, maybe even three!!!!

The speed pattern suggests that the internal drive accepts at a higher rate than the USB drive causing the variations in performance.

If this be true, two USB drives in parallel will probably be steady at                                        22MB/S in swap transfer speed.  *8GB in 6 min+,  full DVD?

Mebbe I can beg,borrow another USB 2.0 to IDE interface soon!

big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#17 2006-10-10 15:57:11

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Sleepy-headed at 2:30 am, I realized that if I unmounted /mytmpfs I would be left with a minimal swap size, restored ram free and the deactivate a reasonable one minute or so in reboot or shutdown.  This unloaded the system immediately, removing all but 500+ of swap data, and opening up free ram to over 2GB.  System was operative at all times thanks to kswapd in the kernel.

Perhaps a system utilizing a swap drive in hdb with only swap partitioned,(no operating system) would optimize the swap interface to the beginning of the drive, whereas, my present utilization is near the end of the 40GB drive space.

The mobo,agp and ethernet card are the only required internal elements when utilizing Live Larch after the initial install.  The power supply is requirement is reduced.  All entries into the system can be made via internet-pacman-and USB/IEEE1394 or CD/DVDrom (minimal power required).  If swap will not be required, the USB external drives an be turned off since the system has 3GB of ram.  Flash drives can supply custom packages as desired.

My external drive is not partitioned optimally  since it has the swap partitions near the end of drive space.  I believe operation could be improved by providing a swap only drive for the external 2.0USB device(s) with first partitions of 4GB provided.

With the system loaded at 10GB of data, the free ram was more than adequate to perform desired system functions and at normal speeds.

This system is based on the feature of tmpfs having the ability to utilize swap, extending the memory to many GB.

As I understand Linux swap, the partition size has to be limited to 4GB.  Perhaps I am wrong in that so let me know!!!

External HDD'S could be utilized to load  desired data via USB(or any other compatible device)

Need another external USB/IDE device!!.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#18 2006-10-10 17:08:21

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

What happens if I introduce /mytmpfs2 directory?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#19 2006-10-10 23:36:13

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Santa came early, providing a nice USB enclosure for my HDD!  Will be a gift for my daughter at Xmas.

Mounted /mytmpfs at 16GB...entered swapoff ..modified fstab for priorities,,entered swapon.

Mounted hda3 and opened for transfer...opened /mytmpfs and began transfers.

First transfer was 1.6GB of mp3 files which is small series of songs it slowly at first, both external drives active, ~10MB/S increased steadily to a peak of 32MB/S and fell back to 10 to 15MB/S.

Next was 5.9GB larch .iso which loaded at speeds 15MB/S to 22MB/S throughout the transfer.

Next was a Video of 0,7GB loading at 16 to 20MB/S throughout.

Next was a VOB video at 1GB  averaging 16+MB/S throughout.

Lastly, IGB Video.avi loaded at a steady 16.5MB/S throughout.

The kernel daemon kswapd maintained tmpfs file untouched by these transfers.

Total transfers were 10.2GB the swap file showing 6950192KB free and the ram in use = 2341932 with 774944KB free.

The swap partitions are still the same and moving same to a better disk position will probably raise the speed.

I predicted 22MB/S but lost 6 in translation from binary to plain english
  lol

Some conclusion can be drawn from the speed variations which might well be due to content of the transfered files.
I appreciate the nominal 16MB/S as acceptable.

I hope this experiment is of value to other users.

More testing to come after getting the swap on first partition.

What could a second /mytmpfs(2) do for the system?

Both drives are maxtor ata/133, my system is athlon 1900+ (1600mhz) with 3GB ram, DVD dual layer rom Sony, on a asus a7v333 mobo with 4 USB 2.0 ports

This post typed while in larch boot copy-to-ram with 16MB swap provided.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#20 2006-10-11 17:44:21

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Decided to try another experimentjavascript:emoticon('8)')
I used qtparted to partition a wd400 HDD fully swap, 40GB.

Installed it in the USB 2.0/IDE interface and loaded 15.1GB of data into it as swap with priority established.

The data entered swap device  at 15MB/S average speed for the entire 15GB.

This speed seems to be near the usual for my system in USB transfers.

I may not be able to increase the speed with paralleled swap drives with the previous statement prevailing.

Perhaps using an ATA133 drive may load faster but not very much.

USB2.0 is a far cry from 60MB/sec top speed..........

Swap doesn't seem to be limited to 2GB as often googled.  Dunno what the limit is in arch.....

My system is up and running with the swap loaded at 15GB and the system ram free is 700MB as managed by kswapd during the transfers.  Tmpfs as set up in Larch remains untouched at 1.8GB, 1.3GB free.

It is possible paralleling primary and slave HD's will increase swap operations.  Since the primary drive is not required for Larch boot, this seems a good candidate for testing parallel swap use.  I had hoped for an external swap solution better than the 15MB/S but that is an acceptable value based on present parameters in USB2.0 and it is a single drive arrangement.

Thus, I can parallel the wd400 40GB(swap) with a maxtor100GB(8GB swap) and run a test of internal swap speeds.

Glutton for punishment!!! lol


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#21 2006-10-11 20:57:52

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Myjavascript:emoticon(':oops:').

Can't load at same speed from source without a source!!!

Will try wd400 as primary swap only and load via USB from the drive that has the data which is all that I  can do and poor at that!

I may also try using the source drive as primary slave.

The first option keeps a single drive in the computer case.

Option two uses the common cable interface for primary and slave*******

Woe...


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#22 2006-10-11 22:41:58

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Last tests of the swap domain.

Installed the arch source drive in USB external 2.0 assembly.

Installed wd400 40GB swap drive in primary HDD slot.

Booted system with Larch DVD and set up for transfer with wd400HD as priority swap.

Transfers were steady at 15MB/S for 15GB of transfers.

Restarted the system with the arch 80GB drive as primary slave.

Repeated the setup and transfers as before.

The transfers occured at a nominal 20 to 25MB/S rate.

No anomalies were encountered in any of the tests and the system runs at good speed for normal use in the -to-ram mode.

No further tests are antici[pated.....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#23 2006-10-12 05:00:39

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Several side issues in using swap:

Fstab can be setup in at last two ways:

           /dev/sda1  none swap sw,pri3  0  0
                               or

           /dev/sda1  swap  swap defaults,p3   0  0

The above is for full disc swap....use partition number if otherwise arranged....

Command line use;

          swapon -p3 /dev/sda1     (full disc)

          swapon -p3 /dev/sda1; swapon -p3 /dev/sdb1; swapon -p1 /dev/sdc1  (full discs)

          swapoff -a /dev/sda1; swapoff -a /dev/sdb1  (full disc)

With Larch live CD/DVD, the swap on is possible at boot entry of ...swap...I believe it setsup all devices having swap, but not with separated priorities if that is desired.  CLI entries or fstab can arrange the selected devices to desired priorities if swapoff is applied before changing device priorities

The parallel use of USB devices for swap is similar to raid striping, the priority statement arranges that in Linux.

I haven't found a limit to swap partition(full disc?) size and it is reported to be OS established within the paging system.

More than one custom tmpfs directory can be mounted if an application requires such a procedure.......j yikes

Hoping for better flash devices...............................


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#24 2006-10-13 19:14:21

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Installed wd400 40GB swap as hdb2 to test transfer rate within the primary HDD area.

Using mounted /mytmpfs directory transferred data from Hda3 to that directory.  Hdb1 was the only swap drive enabled, none in hda3 were enabled.

When swap was utilized after 4GB of transfers, the transfer rate stabilzed between 17MB/S and 20MB/S.

The hda3 drive is dma 6 and the hdb drive is dma 5.

This indicates the swap implementation within the OS limits the transfer speed or the drives utilized are not capable of higher swap transfer rates than ~20MB/S. 

Because transfers occuring before swap is initiated are at rates 25 to 38MB/s, the drives seem capable of higher transfer speed.

Swap transfers entail considerable kernel kswapd control of paging and doubtless this activity is paramount in slowing the transfers.

It would seem that utilizing external swap drives would entail an additional loss of transfer speed producing slower performance in that mode.

Therefore, the conclusion I draw is that 17MB/S transfer rates to external USB swap drives is a reasonable rate when compared to the rate obtained with internal swap drive rates.
There may be an impact on swap behavior if the primary drive was also the swap drive.

The test was performed in a normal arch boot and also in a Larch live c2r boot.  Same result.

System performance seems not affected.  In larch live boot, transfers to desktop are limited by the tmpfs size determined in Larch boot init. 

Aside note, if adding an external USB flash unit formatted as swap, the media display comes up as it does with all hot-plug devices.  It will not open a fully swap partitioned drive, but you already knew that!  The drive is enabled with swapon in CLI.

I also conclude that use of swap in this manner in Larch Live copy-to-ram enables a large increase in useable extended ram which can provide a local repository of packages  suitable for custom install under pacman control which is not internet related.

The loading time for these packages is rapid compared to either dial-up or dsl internet pacman package access and install.  This applies to the copy-to-ram mode that I have used in my experiments.  I haven't tried it in normal larch boots.

Thus, use of parallel swap devices in USB 2.0 may raise performance up -to but not beyond ~18 to 20MB/S is my conclusion.  Not too bad, either....I have found that a single drive hdd in USB 2.0 gives 15 to 18MB/S speed.

Still don't know the limits to swap in this OS........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#25 2006-10-13 20:45:47

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Extended memory with swap in ARCH (swap to 30GB)

Question about using USB flash or HDD with IDE to load the arch system.

What speed is encountered with either method of USB boot?

My system does not have USB boot.

Please advise with data if you have such a system.

Thanks in advance/ big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB