All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Beta testing crush optimization
@ 2017-05-31  9:52 han vincent
  0 siblings, 0 replies; 24+ messages in thread
From: han vincent @ 2017-05-31  9:52 UTC (permalink / raw)
  To: ceph-devel; +Cc: loic

hello, loic:

I had a cluster build with hammer 0.94.10, then I used the following
commands to change the algorithm from "straw" to "straw2".
1. ceph osd crush tunables hammer
2. ceph osd getcrushmap -o /tmp/cmap
3. crushtool -d /tmp/cmap -o /tmp/cmap.txt
4. vim /tmp/cmap.txt and change the algorithm of each bucket from
"straw" to "straw2"
5. crushtool -c /tmp/cmap.txt -o /tmp/cmap
6. ceph osd setcrushmap -i /tmp/cmap
7. ceph osd crush reweight-all
after that, I used "python crush" to optimize the cluster, the version
of "python crush" is 1.0.32

1. ceph report > report.json
2. crush optimize --crushmap report.json --out-path optimized.crush
Unfortunately, there was an error in the output:

2017-05-30 18:48:01,803 42.1 map to [4, 9] instead of [4, 8]
2017-05-30 18:48:01,838 49.3af map to [9, 2] instead of [9, 3]
2017-05-30 18:48:01,838 49.e3 map to [6, 4] instead of [6, 5]
2017-05-30 18:48:01,838 49.e1 map to [7, 2] instead of [7, 3]
2017-05-30 18:48:01,838 49.e0 map to [5, 1] instead of [5, 0]
2017-05-30 18:48:01,838 49.20d map to [3, 1] instead of [3, 0]
2017-05-30 18:48:01,838 49.20c map to [2, 9] instead of [2, 8]
2017-05-30 18:48:01,838 49.36e map to [6, 1] instead of [6, 0]
......

Traceback (most recent call last):
 File "/usr/bin/crush", line 25, in <module>
sys.exit(Ceph().main(sys.argv[1:]))
 File "/usr/lib64/python2.7/site-packages/crush/main.py", line 136, in main
return self.constructor(argv).run()
 File "/usr/lib64/python2.7/site-packages/crush/optimize.py", line 373, in run
crushmap = self.main.convert_to_crushmap(self.args.crushmap)
 File "/usr/lib64/python2.7/site-packages/crush/ceph/__init__.py",
line 690, in convert_to_crushmap
c.parse(crushmap)
 File "/usr/lib64/python2.7/site-packages/crush/__init__.py", line 138, in parse
return self.parse_crushmap(self._convert_to_crushmap(something))
 File "/usr/lib64/python2.7/site-packages/crush/ceph/__init__.py",
line 416, in _convert_to_crushmap
crushmap = CephReport().parse_report(something)
 File "/usr/lib64/python2.7/site-packages/crush/ceph/__init__.py",
line 137, in parse_report
raise MappingError("some mapping failed, please file a bug at "
crush.ceph.MappingError: some mapping failed, please file a bug at
http://libcrush.org/main/python-crush/issues/new
Do you know what the problem is? can you help me? I would be very
grateful to you.

^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <CANNfkubYdJqJDRV8kuNDBy368OxOyXkXKU3wr9ULFeafPnBoHg@mail.gmail.com>]
* Beta testing crush optimization
@ 2017-05-24 13:48 Loic Dachary
  2017-05-24 13:50 ` Stefan Priebe - Profihost AG
  0 siblings, 1 reply; 24+ messages in thread
From: Loic Dachary @ 2017-05-24 13:48 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: Ceph Development

Hi Stefan,

Thanks for volunteering to beta test the crush optimization on a live cluster :-)

The "crush optimize" command was published today[1] and you should be able to improve your cluster distribution with the following:

ceph report > report.json
crush optimize --no-forecast --step 64 --crushmap report.json --pool 3 --out-path optimized.crush
ceph osd setcrushmap -i optimized.crush

Note that it will only perform a first optimization step (moving around 64 PGs). You will need to repeat this command a dozen time to fully optimize the cluster. I assume that's what you will want to control the workload. If you want a minimal change at each step, you can try --step 1 but it will require more than a hundred steps.

If you're not worried about the load of the cluster, you can optimize it in one go with:

ceph report > report.json
crush optimize --crushmap report.json --pool 3 --out-path optimized.crush
ceph osd setcrushmap -i optimized.crush

Cheers

[1] http://crush.readthedocs.io/en/latest/ceph/optimize.html

-- 
Loïc Dachary, Artisan Logiciel Libre

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-06-06 13:58 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31  9:52 Beta testing crush optimization han vincent
     [not found] <CANNfkubYdJqJDRV8kuNDBy368OxOyXkXKU3wr9ULFeafPnBoHg@mail.gmail.com>
2017-05-31 11:34 ` Loic Dachary
2017-05-31 12:40   ` Loic Dachary
     [not found]     ` <CANNfkubxHfAYn-aLkHCQV_YZoMuVTzug9nRbvaTSE4UyKiQLuw@mail.gmail.com>
2017-06-01  7:17       ` Loic Dachary
2017-06-01 10:07         ` han vincent
     [not found]         ` <CANNfkuZbfNSW5CQHaV0yyF3744FPf-gh0vKBj45bZKrvZ27MhA@mail.gmail.com>
2017-06-01 10:21           ` Loic Dachary
2017-06-01 11:38             ` han vincent
2017-06-01 11:43               ` Loic Dachary
2017-06-01 11:52                 ` han vincent
2017-06-01 12:08                   ` Loic Dachary
2017-06-01 12:17                     ` han vincent
2017-06-01 12:23                       ` Loic Dachary
2017-06-01 12:32                         ` han vincent
2017-06-01 12:49                           ` Loic Dachary
2017-06-02  3:15                             ` han vincent
2017-06-02  6:20                               ` Loic Dachary
2017-06-02  6:40                                 ` Loic Dachary
2017-06-02  9:28                                   ` han vincent
2017-06-06  9:02                                   ` han vincent
2017-06-06 13:58                                     ` Loic Dachary
  -- strict thread matches above, loose matches on Subject: below --
2017-05-24 13:48 Loic Dachary
2017-05-24 13:50 ` Stefan Priebe - Profihost AG
2017-05-24 14:01   ` Loic Dachary
2017-05-31  7:01     ` Loic Dachary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.