Skip to content

Used to Trigger various kinds of IO on the given ceph Host.

License

Notifications You must be signed in to change notification settings

pdhiran/Instant-IO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instant-io

Used to Trigger various kinds of IO on the given ceph Host.

To trigger any kind of IO, follow the following steps:

  1. Install Python 3 using the command :
    • yum install python3-pip -y
  2. Create a folder On the host were we need to run IO. CD to the dir.
  3. Clone the instant-io repo using the command:
    • git clone https://github.com/pdhiran/Instant-IO.git
  4. Setup a python3 virtual environment..
    • python3 -m venv <path/to/venv>
    • source <path/to/venv>/bin/activate
  5. Install requirements with pip install -r requirements.txt
  6. That's it!!!! Once you edit the config.json file as per your needs, you are good to go. All the sections that are set to "trigger": true will be run on the host!!!!
  7. To run the IO's using the script after the config changes, execute : python3 instant-io.py.

Understanding the config file and editing it as per needs.

Config file is written in JSON format. It is very similar to the dictionary structure we use.

  1. Set the logging parameter. Use "INFO" to get minimal details generated or use "DEBUG" to get maximum information about the runs. The log file is generated within the same folder with name log_IO_timestamp. Eg : log_IO_20200913090428.txt.

There are various sections in the json file like RGW, Rados_Bench, which indicate the various types of IO that can be run on the cluster.

RGW section

Various Params in the RGW section :

        "RGW":
          {
            "trigger": false,
            "rgw_host": "<IP/FQDN>",
            "create_rgw_user": false,
            "access_key": null,
            "secret_key": null,
            "create_bkt_obj": true,
            "num_buckets": 10,
            "num_objects": 10,
            "download_objects": true,
            "delete_buckets_and_objects": false
          },
  1. "trigger": true -> when set to true, The script will proceed with triggering IO for RGW. It uses BOTO to trigger IO, creating objects. If you do not wish to trigger IO for RGW, set it to false.
  2. "rgw_host": "<IP/FQDN>" -> Add the IP/ Fully qualified domain name of the node as a string. Either IP or FQDN should be fine. Don't give both.
  3. "create_rgw_user": true -> When set to "true", The script itself will create a RGW admin user for creating buckets and objects. All the Pre-Reqs like secret keys and access keys are generated by the script. When the parameter is set to "false", The script expects the RGW admin user to be already created and access key and secret key params to be set.
  4. "access_key": null -> When param "create_rgw_user" is set to false, the script will require the access key of the RGW admin user. Provide the key as a string. Eg : "access_key": "67890"
  5. "secret_key": null -> When param "create_rgw_user" is set to false, the script will require the secret key of the RGW admin user. Provide the key as a string. Eg : "secret_key": "67890"
  6. "num_buckets": 10 -> Specifies the number of Buckets to be created.
  7. "num_objects": 10 -> Specifies the number of objects to be created in each bucket. Eg num_buckets is 10 and num_objects is 10, total 100 Objects will be created. 10 objects each in a bucket.
  8. "download_objects": true -> If true, the objects in all the buckets will be downloaded in the test folder under directory : object_downloads_. Eg : object_downloads_20200913090014
  9. "delete_buckets_and_objects": false -> If set to true, deletes all the objects and buckets created by the user.
  10. "create_bkt_obj": true, -> If set to true, the script will create new buckets and objects. If false, it will not create any new buckets and objects. It will just list all the objects present and other actions that are set in the conf file.
  11. "avoid_user_created_bkts": "all", -> This parameter specifies whether to create objects inside the buckets that were not created by the script. Sometimes the user might want to create objects in buckets that were created by the script, and not in pre-existing buckets. This option can be used in such scenarios. Possible values for avoid_user_created_bkts parameter:
    1. false -> when set to false, objects will be created in all the buckets, both created by user and created by script. Eg : "avoid_user_created_bkts": false,
    2. all -> when set to all( it's like being set to ignore 'ALL' user created buckets ), objects will be created only buckets created by script. User created buckets will not be modified Eg : "avoid_user_created_bkts": "ALL",
    3. list of buckets -> when a list of buckets is provided( it's like being set to ignore the given buckets ), objects will not be created buckets present in the list. Please provide bucket names as comma(",") separated values Eg : "avoid_user_created_bkts": "test_bkt1, testbkt2, test_bkt3",
Rados_Bench section

Various Params in the Rados_Bench section :

        "Rados_Bench":
          {
            "trigger": false,
            "no_pools": 2,
            "write_seconds": 60,
            "Size": 4096,
            "sequential_read": true,
            "random_read": true,
            "read_seconds": 200,
            "delete_bench_data": false
          }
  1. "trigger": true -> when set to true, The script will proceed with triggering IO for Rados. It uses Rados bench tool to trigger IO, creating objects. If you do not wish to trigger IO for Rados, set it to false.
  2. `"no_pools": -> Specifies the number of pools to be created. The below mentoned settings will be applied on all the pools created.
  3. "write_seconds": <secs> -> Specifies the duration for which the Rados bench write opration will be performed on the pool.
  4. "Size": <bytes> -> Specifies the size of the object being written.
  5. "sequential_read": true -> If set to true, Performs Sequential read operation on the benchmark data written on the pool.
  6. "random_read": true -> If set to true, Performs Random read operation on the benchmark data written on the pool.
  7. "read_seconds": 200 -> Specifies the duration for which the Read opration will be performed on the benchmark data written onto pool.
  8. "delete_bench_data": false -> If set to true, deletes all the benchmark data written onto the pools created.
RBD section

Various Params in the RBD section :

    "RBD":
          {
            "trigger": false,
            "num_loops": 2,
            "num_parallel_jobs": 6,
            "block_size": "16k",
            "write_size": "512m",
            "run_time": 500,
            "delete_file_data": false
          }
  1. "trigger": true -> when set to true, The script will proceed with triggering IO for RBD. It uses Rados FIO to trigger IO. If you do not wish to trigger IO, set it to false.
  2. "num_loops": 2, -> Number of times the below IO config to be run the host
  3. "num_parallel_jobs": 6 -> Number of threads to be spawned on the host for running the IO of given size
  4. "block_size": "16k" -> The block size in bytes used for I/O units.
  5. "write_size": "512m" -> The total size of file I/O for each thread of the job.
  6. ""run_time": 500 -> Tell fio to terminate processing after the specified period of time. It can be quite hard to determine for how long a specified job will run, so this parameter is handy to cap the total runtime to a given time.
  7. "delete_file_data": false -> Instructs the Script to delete the data written
CephFS section

Various Params in the RBD section :

    "CephFS":
          {
            "trigger": true,
            "num_threads": 10,
            "num_files": 2048,
            "file_size": 512
          }
  1. "trigger": true -> when set to true, The script will proceed with triggering IO for CephFS. It uses SmallFile to trigger IO. If you do not wish to trigger IO, set it to false.
  2. "num_threads": 2, -> Number of parallel threads that needs to be run.
  3. "num_files": 6 -> Number of files to be created by the smallfile tool.
  4. "file_size": 6 -> The size of each file in KB that will be created by the smallfile tool.

About

Used to Trigger various kinds of IO on the given ceph Host.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages