Hi kikazu,
you didn't mention your BSM version and your server distribution.
While 20 minutes sounds like a lot, I do have one BSM 9.26 IP1 environment (2 x GW, 2 x DPS) where stopping BSM takes a long time.
I just checked the log (<HPBSM>\log\supervisor\nannyStatus.log),
as you can see, it takes 15 minutes on the primary GW, the majority of the time is spend in stopping OPR, OPR-SCRIPTING-HOST and bpi_process_repos
2016-09-16 17:43:45,855 User operation - stop nanny
2016-09-16 17:43:46,868 businessImpact_service STOPPING
2016-09-16 17:43:52,568 businessImpact_service STOPPED
2016-09-16 17:43:52,584 pi_engine STOPPING
2016-09-16 17:43:58,794 pi_engine STOPPED
2016-09-16 17:43:58,810 OPR STOPPING
2016-09-16 17:48:40,798 OPR STOPPED
2016-09-16 17:48:40,813 OPR-SCRIPTING-HOST STOPPING
2016-09-16 17:53:24,283 OPR-SCRIPTING-HOST STOPPED
2016-09-16 17:53:24,298 bpi_process_repos STOPPING
2016-09-16 17:58:07,815 bpi_process_repos STOPPED
2016-09-16 17:58:07,830 offline_engine STOPPING
2016-09-16 17:58:09,049 offline_engine STOPPED
2016-09-16 17:58:09,065 basel_engine STOPPING
2016-09-16 17:58:10,643 basel_engine STOPPED
2016-09-16 17:58:10,658 marble_supervisor STOPPING
2016-09-16 17:58:12,799 marble_supervisor STOPPED
2016-09-16 17:58:12,815 marble_matcher STOPPING
2016-09-16 17:58:14,049 marble_matcher STOPPED
2016-09-16 17:58:14,065 marble_worker_1 STOPPING
2016-09-16 17:58:15,190 marble_worker_1 STOPPED
2016-09-16 17:58:15,205 marble_loader STOPPING
2016-09-16 17:58:16,377 marble_loader STOPPED
2016-09-16 17:58:16,393 pmanager STOPPING
2016-09-16 17:58:17,533 pmanager STOPPED
2016-09-16 17:58:17,549 mercuryAS STOPPING
2016-09-16 17:58:35,018 mercuryAS STOPPED
2016-09-16 17:58:35,033 odb STOPPING
2016-09-16 17:58:36,658 odb STOPPED
2016-09-16 17:58:36,674 hornetq STOPPING
2016-09-16 17:58:38,674 hornetq STOPPED
2016-09-16 17:58:38,674 All services stopped in 14m:51s
although there is not a lot of activity going on.
Similaer to DPS2 (failover):
it takes 10 minutes, most of the time is spend in the same processes as on DPS1
2016-09-16 17:47:32,399 OPR STOPPING
2016-09-16 17:50:44,969 OPR STOPPED
2016-09-16 17:50:44,980 OPR-SCRIPTING-HOST STOPPING
2016-09-16 17:53:56,845 OPR-SCRIPTING-HOST STOPPED
2016-09-16 17:53:56,858 bpi_process_repos STOPPING
2016-09-16 17:57:08,164 bpi_process_repos STOPPED
GW1 and GW2: roughly 4 minutes
another BSM 9.26 IP2 (typical installation) takes less than 8 minutes to stop.
I assume that it simply takes a lot of time to synchronize the BSM parts on the servers during the shutdown.
Greetings
Siggi