LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-13-2020, 08:14 PM   #1
shams
Member
 
Registered: Jan 2004
Posts: 539

Rep: Reputation: 30
Add swap partition from another hard disk?


My laptop has 8GB RAM and have two hard disk, one is SSD 250 GB and other one is hdd and 500 GB i want to use the SSD drive as / partition and create swap partition in hdd, is this make any deference in performance of linux system, the second question is what size will be better for swap partition for good performance of the latest linux distributions.

Last edited by shams; 12-13-2020 at 08:16 PM.
 
Old 12-13-2020, 08:25 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,399

Rep: Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192
Looks like a good idea. Shouldn't affect performance unless you have other problems (bad memory leak say). With lots of disk, make it any size you like - say 8G. No real reason, just a number till you know how if it ever gets used.
 
Old 12-13-2020, 08:51 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,389

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
Quote:
Originally Posted by shams View Post
is this make any deference in performance of linux system, the second question is what size will be better for swap partition for good performance of the latest linux distributions.
It is easy to run tests on your system to see what swap size and configuration works best for you. Set up the various swap partitions that you are considering. Then use the swapon and swapoff commands to switch among your various swap partitions. Run heavy tests of your typical workload against each configuration and see which configuration performs best. If you do this I ask you to post the results here on linuxquestions to let us know what works best for you.

see;

man swapon

man swapoff

-----------------------
Steve Stites

P.S. One of your test runs should be with no swap partition enabled. That will give a base performance to measure how much each swap partition improves performance, if any.

Over the years I have found that the best performance improvement when using a two drive system is by placing /usr on a separate drive from the rest of the Linux system.

Last edited by jailbait; 12-13-2020 at 09:07 PM.
 
Old 12-13-2020, 09:34 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,948
Blog Entries: 28

Rep: Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358Reputation: 6358
This should work just fine.

Back in the olden days, when hard drives were new and very small by today's standards (my first home computer in 1989 had an 85MB HDD), it was quite common to have different partitions on different physical drives. That's one reason /etc/fstab is configured the way it is.

Last edited by frankbell; 12-13-2020 at 09:36 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions on Swap Partition, How did Anyone Pass This Along? Next Ubuntu No Swap Partition happydog500 Linux - Software 18 12-25-2016 12:37 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 02:06 PM
Copy data from one hard disk to another hard disk vino87 Linux - Desktop 4 08-06-2009 11:37 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
mounting linux files from another hard disk(IDE) to current hard disk(sata) the lord protector Linux - Hardware 5 05-04-2008 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration