Increasing swap space

From: Zoran Trifunovic (DSL AK) (ZORANT_at_datacom.co.nz)
Date: 11/19/03

  • Next message: Fred N. van Kempen: "SUMMARY: T64 V5 on Digital Server 5305"
    Date: Thu, 20 Nov 2003 11:47:43 +1300
    To: "'tru64-unix-managers@ornl.gov'" <tru64-unix-managers@ornl.gov>
    
    

    Hi managers,

    The DS20E server (1GB RAM, 2CPUs, Tru64v5.1B) that we look after is short on
    memory
    and the customer wants to add 3GB RAM (to have 4GB total). At the moment the
    server
    has 3GB swap space, so we should probably increase that as well.

    As far as we know, the recommended swap size for Tru64 is 2.5-3 * RAM if the
    swap
    allocation mode is 'eager' and at least 1*RAM if the swap mode is 'lazy'. Is
    it
    a problem if the system has more RAM than swap space (if we leave the swap
    space
    size at 3GB and have 4GB RAM)? If that is not going to cause any problems,
    we would
    probably wait for some time and monitor swap usage to see if they really
    need more
    swap space on that server.

    Increasing swap space size could be quite complicated here. What worries us
    is
    that the server has 4*72GB disks all in one RAID 1+0 (the system was
    originally
    configured by HP). Here is the output of the disklabel command:

    8 partitions:
    # size offset fstype fsize bsize cpg # ~Cyl values
      a: 2097152 0 AdvFS # 0 - 511
      b: 6588334 2097152 swap # 512 -
    2120*
      c: 284524544 0 unused 0 0 # 0 -
    69463
      d: 94317226 1572864 unused 0 0 # 384 -
    23410*
      e: 94317226 95890090 unused 0 0 # 23410*-
    46437*
      f: 2695515 281829029 AdvFS # 68805*-
    69463
      g: 11979980 269849049 AdvFS # 65881*-
    68805*
      h: 261163563 8685486 AdvFS # 2120*-
    65881*

    where partition a is 'root_domain', b is swap, f is 'tmp_domain', g is
    'usr_domain'
    and h is 'app01_domain'.

    Our idea was to take some space from the h partition and either add it to
    partition b
    (if possible), or to make one of the unused partitions (d or e) as another
    swap
    partition using that extra space from partition h. That would include the
    following
    steps:

    - make full filesystem backup
    - save current disklabel (disklabel -r dsk0 > /tmp/dsk0label)
    - unmount filesystems in app01_domain and remove that file domain
    - edit /tmp/dsk0label - shrink partition h and extend partition b (if
    possible)
                            or create new swap partition using d or e.
    - create a new disk label for dsk0 (disklabel -R dsk0 /tmp/dsk0label)
    - create app01_domain and filesets, mount filesystems in app01_domain
    - restore data to the filesystems in app01_domain

    QUESTIONS:

    - is this procedure OK?
    - can we be sure that if we are changing only partitions b and h nothing
    else would
      be affected by the 'disklabel -R' command (especially not the
    root_domain!!!)?
    - can the partition b be increased while it is in use
      (or should it be done in single user mode)?
    - is it better to create new swap partition, rather than to resize partition
    b
      (it shouldn't cause performance problems as it's all striped anyway)?
    - do we need to specify -r and -t options with 'disklabel -R' command to
    make
      sure that the disk will be bootable (although it already is)?
    - what do we need to change in the /etc/fstab and /etc/sysconfigtab if we
    create
      a new swap partition?
    - is it a problem to have more RAM than swap space (e.g. in case the
    application
      reserves the same amount of swap space as the real memory, or for memory
    dump)?
    - any other suggestions?

    Thanks in advance,
    Zoran


  • Next message: Fred N. van Kempen: "SUMMARY: T64 V5 on Digital Server 5305"

    Relevant Pages

    • Re: Clear the computers memory?
      ... So basically, Linux uses the standard swap mechanism to resume, hence ... it was the only partition that the system could safely use without ... long as it had enough space left to dump the RAM contents in it. ... system was responsive before hibernating, it will be as responsive after ...
      (Ubuntu)
    • Re: Few questions before I try to install Ubuntu
      ... As you can see I've got a machine with less than 512MB Ram, ... mail should fly and not need more than 128MB of swap really. ... As long i use Ubuntu my swap was used max. 10MB if even that. ... your swap partition will see relatively ...
      (Ubuntu)
    • Re: Clear the computers memory?
      ... reload when the applications/prosseses are actively accessing that memory. ... So basically, Linux uses the standard swap mechanism to resume, hence ... it was the only partition that the system could safely use without ... long as it had enough space left to dump the RAM contents in it. ...
      (Ubuntu)
    • Re: Few questions before I try to install Ubuntu
      ... As long i use Ubuntu my swap was used max. 10MB if even that. ... in your e-mail you mention that you have 512 MB of RAM. ... your swap partition will see relatively ...
      (Ubuntu)
    • Re: How much drive space for Linux?
      ... > How much drive space should I set aside for Linux (the root partition)? ... will you be using a swap file sitting on this ... space as you have RAM. ...
      (linux.redhat.install)