~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to doc/source/deployment_guide.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Chuck Short
  • Date: 2013-08-13 10:37:13 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130813103713-1ctbx4zifyljs2aq
Tags: 1.9.1-0ubuntu1
[ James Page ]
* d/control: Update VCS fields for new branch locations.

[ Chuck Short ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
328
328
bind_ip              0.0.0.0     IP Address for server to bind to
329
329
bind_port            6000        Port for server to bind to
330
330
bind_timeout         30          Seconds to attempt bind before giving up
331
 
workers              1           Number of workers to fork
 
331
workers              auto        Override the number of pre-forked workers
 
332
                                 that will accept connections.  If set it
 
333
                                 should be an integer, zero means no fork.  If
 
334
                                 unset, it will try to default to the number
 
335
                                 of effective cpu cores and fallback to one.
 
336
                                 Increasing the number of workers may reduce
 
337
                                 the possibility of slow file system
 
338
                                 operations in one request from negatively
 
339
                                 impacting other requests, but may not be as
 
340
                                 efficient as tuning :ref:`threads_per_disk
 
341
                                 <object-server-options>`
332
342
max_clients          1024        Maximum number of clients one worker can
333
343
                                 process simultaneously (it will actually
334
344
                                 accept(2) N + 1). Setting this to one (1)
335
345
                                 will only handle one request at a time,
336
346
                                 without accepting another request
337
 
                                 concurrently. By increasing the number of
338
 
                                 workers to a much higher value, one can
339
 
                                 reduce the impact of slow file system
340
 
                                 operations in one request from negatively
341
 
                                 impacting other requests.
 
347
                                 concurrently.
342
348
disable_fallocate    false       Disable "fast fail" fallocate checks if the
343
349
                                 underlying filesystem does not support it.
344
350
log_custom_handlers  None        Comma-separated list of functions to call
353
359
                                 early.
354
360
===================  ==========  =============================================
355
361
 
 
362
.. _object-server-options:
 
363
 
356
364
[object-server]
357
365
 
358
366
==================  =============  ===========================================
462
470
bind_ip              0.0.0.0     IP Address for server to bind to
463
471
bind_port            6001        Port for server to bind to
464
472
bind_timeout         30          Seconds to attempt bind before giving up
465
 
workers              1           Number of workers to fork
 
473
workers              auto        Override the number of pre-forked workers
 
474
                                 that will accept connections.  If set it
 
475
                                 should be an integer, zero means no fork.  If
 
476
                                 unset, it will try to default to the number
 
477
                                 of effective cpu cores and fallback to one.
 
478
                                 Increasing the number of workers may reduce
 
479
                                 the possibility of slow file system
 
480
                                 operations in one request from negatively
 
481
                                 impacting other requests.  See
 
482
                                 :ref:`general-service-tuning`
466
483
max_clients          1024        Maximum number of clients one worker can
467
484
                                 process simultaneously (it will actually
468
485
                                 accept(2) N + 1). Setting this to one (1)
469
486
                                 will only handle one request at a time,
470
487
                                 without accepting another request
471
 
                                 concurrently. By increasing the number of
472
 
                                 workers to a much higher value, one can
473
 
                                 reduce the impact of slow file system
474
 
                                 operations in one request from negatively
475
 
                                 impacting other requests.
 
488
                                 concurrently.
476
489
user                 swift       User to run as
477
490
disable_fallocate    false       Disable "fast fail" fallocate checks if the
478
491
                                 underlying filesystem does not support it.
582
595
bind_ip              0.0.0.0     IP Address for server to bind to
583
596
bind_port            6002        Port for server to bind to
584
597
bind_timeout         30          Seconds to attempt bind before giving up
585
 
workers              1           Number of workers to fork
 
598
workers              auto        Override the number of pre-forked workers
 
599
                                 that will accept connections.  If set it
 
600
                                 should be an integer, zero means no fork.  If
 
601
                                 unset, it will try to default to the number
 
602
                                 of effective cpu cores and fallback to one.
 
603
                                 Increasing the number of workers may reduce
 
604
                                 the possibility of slow file system
 
605
                                 operations in one request from negatively
 
606
                                 impacting other requests.  See
 
607
                                 :ref:`general-service-tuning`
586
608
max_clients          1024        Maximum number of clients one worker can
587
609
                                 process simultaneously (it will actually
588
610
                                 accept(2) N + 1). Setting this to one (1)
589
611
                                 will only handle one request at a time,
590
612
                                 without accepting another request
591
 
                                 concurrently. By increasing the number of
592
 
                                 workers to a much higher value, one can
593
 
                                 reduce the impact of slow file system
594
 
                                 operations in one request from negatively
595
 
                                 impacting other requests.
 
613
                                 concurrently.
596
614
user                 swift       User to run as
597
615
db_preallocation     off         If you don't mind the extra disk space usage in
598
616
                                 overhead, you can turn this on to preallocate
696
714
bind_timeout                  30               Seconds to attempt bind before
697
715
                                               giving up
698
716
swift_dir                     /etc/swift       Swift configuration directory
699
 
workers                       1                Number of workers to fork
 
717
workers                       auto             Override the number of
 
718
                                               pre-forked workers that will
 
719
                                               accept connections.  If set it
 
720
                                               should be an integer, zero
 
721
                                               means no fork.  If unset, it
 
722
                                               will try to default to the
 
723
                                               number of effective cpu cores
 
724
                                               and fallback to one.  See
 
725
                                               :ref:`general-service-tuning`
700
726
max_clients                   1024             Maximum number of clients one
701
727
                                               worker can process
702
728
                                               simultaneously (it will
705
731
                                               will only handle one request at
706
732
                                               a time, without accepting
707
733
                                               another request
708
 
                                               concurrently. By increasing the
709
 
                                               number of workers to a much
710
 
                                               higher value, one can reduce
711
 
                                               the impact of slow file system
712
 
                                               operations in one request from
713
 
                                               negatively impacting other
714
 
                                               requests.
 
734
                                               concurrently.
715
735
user                          swift            User to run as
716
736
cert_file                                      Path to the ssl .crt. This
717
737
                                               should be enabled for testing
921
941
NTP server to ensure that the system times are as close as possible.  This
922
942
should also be monitored to ensure that the times do not vary too much.
923
943
 
 
944
.. _general-service-tuning:
 
945
 
924
946
----------------------
925
947
General Service Tuning
926
948
----------------------
968
990
the best all-around choice. If you decide to use a filesystem other than
969
991
XFS, we highly recommend thorough testing.
970
992
 
971
 
If you are using XFS, some settings that can dramatically impact
972
 
performance. We recommend the following when creating the XFS
973
 
partition::
974
 
 
975
 
    mkfs.xfs -i size=1024 -f /dev/sda1
 
993
For distros with more recent kernels (for example Ubuntu 12.04 Precise),
 
994
we recommend using the default settings (including the default inode size
 
995
of 256 bytes) when creating the file system::
 
996
 
 
997
    mkfs.xfs /dev/sda1
 
998
 
 
999
In the last couple of years, XFS has made great improvements in how inodes
 
1000
are allocated and used.  Using the default inode size no longer has an
 
1001
impact on performance.
 
1002
 
 
1003
For distros with older kernels (for example Ubuntu 10.04 Lucid),
 
1004
some settings can dramatically impact performance. We recommend the
 
1005
following when creating the file system::
 
1006
 
 
1007
    mkfs.xfs -i size=1024 /dev/sda1
976
1008
 
977
1009
Setting the inode size is important, as XFS stores xattr data in the inode.
978
1010
If the metadata is too large to fit in the inode, a new extent is created,
979
1011
which can cause quite a performance problem. Upping the inode size to 1024
980
1012
bytes provides enough room to write the default metadata, plus a little
981
 
headroom. We do not recommend running Swift on RAID, but if you are using
 
1013
headroom.
 
1014
 
 
1015
The following example mount options are recommended when using XFS::
 
1016
 
 
1017
    mount -t xfs -o noatime,nodiratime,nobarrier,logbufs=8 /dev/sda1 /srv/node/sda
 
1018
 
 
1019
We do not recommend running Swift on RAID, but if you are using
982
1020
RAID it is also important to make sure that the proper sunit and swidth
983
1021
settings get set so that XFS can make most efficient use of the RAID array.
984
1022
 
985
 
We also recommend the following example mount options when using XFS::
986
 
 
987
 
    mount -t xfs -o noatime,nodiratime,nobarrier,logbufs=8 /dev/sda1 /srv/node/sda
988
 
 
989
1023
For a standard swift install, all data drives are mounted directly under
990
1024
/srv/node (as can be seen in the above example of mounting /def/sda1 as
991
1025
/srv/node/sda). If you choose to mount the drives in another directory,