How to stop Indexing Service

Questions and mods regarding system management may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/support_form.php?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.

Was this post helpful?

Yes
1
100%
No
0
No votes
 
Total votes: 1
dru
I'm New!
I'm New!
Posts: 2
Joined: Sat Nov 05, 2016 6:02 pm

How to stop Indexing Service

Postby dru » Sat Nov 05, 2016 6:21 pm

I had to replace a bad disk in my RAID. When I did, the rebuild was taking too long - expected completion in 16 days! So, I had to figure out how to stop the indexing service which was consuming 50% of my CPU. This is not as easy as you think it might be as you simply cannot kill the service. I did the following to successfully stop it and bring down the time from 16 DAYS to 16 HOURS !!! Here is the procedure, I hope it is helpful for you.

- dru

TO DISABLE INDEXING ON SYNOLOGY
-------------------------------

1. FIRST DISABLE INDEXING THROUGH DiskStation Manager
a. via Control Panel->Indexing Service
b. via Control Panel->Info Center

2. sudo to system and do the following
a. cat /proc/mdstat

ADMINUSER@XXXXXX:/proc$ cat mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid5 sdc5[4] sdb5[0] sde5[3] sdd5[2]
23427586368 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
[>....................] recovery = 0.9% (76223480/7809195456) finish=10598.9min speed=12159K/sec

md3 : active raid0 sda1[0]
1000196800 blocks super 1.2 64k chunks [1/1] [U]

md1 : active raid1 sdc2[1] sdb2[0] sdd2[2] sde2[3]
2097088 blocks [5/4] [UUUU_]

md0 : active raid1 sdc1[1] sdb1[0] sdd1[2] sde1[3]
2490176 blocks [5/4] [UUUU_]

unused devices: <none>

This is telling me that it will take 11k minutes or 16 DAYS to complete!

3. run top
top - 08:48:59 up 2:30, 1 user, load average: 2.44, 2.50, 2.80
Tasks: 200 total, 2 running, 196 sleeping, 0 stopped, 2 zombie
%Cpu(s): 0.2 us, 10.7 sy, 7.5 ni, 71.5 id, 9.9 wa, 0.0 hi, 0.2 si, 0.0 st
GiB Mem : 1.940 total, 0.111 free, 0.585 used, 1.245 buff/cache
GiB Swap: 3.164 total, 3.164 free, 0.000 used. 0.972 avail Mem

PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND
8336 root 30 10 106.5m 6.5m 44.7 0.3 0:01.93 R /usr/syno/sbin/synoindexplugind
14836 root 30 10 88.7m 31.6m 28.9 1.6 5:44.40 S /usr/syno/sbin/synoindexscand
11673 root 20 0 685.1m 5.3m 1.3 0.3 0:22.73 S scemd
14675 root 20 0 382.6m 8.5m 1.3 0.4 1:49.18 S /usr/syno/sbin/synorelayd
....

4. Disable indexing on PhotoStation, VidoStation and AudioStation as needed

ADMINUSER@XXXXXX:/usr/syno/bin$ sudo -i
Password:

root@XXXXXX:/var/spool# cd /usr/syno/bin
root@XXXXXX:/usr/syno/bin# synoindex_package.sh disable PhotoStation
root@XXXXXX:/usr/syno/bin# synoindex_package.sh disable VideoStation
root@XXXXXX:/usr/syno/bin# top

5. Run top and mdstat once again

top - 09:32:37 up 3:13, 1 user, load average: 1.92, 1.97, 2.17
Tasks: 206 total, 1 running, 203 sleeping, 0 stopped, 2 zombie
%Cpu(s): 15.3 us, 8.9 sy, 0.0 ni, 61.4 id, 13.9 wa, 0.0 hi, 0.5 si, 0.0 st
GiB Mem : 1.940 total, 0.113 free, 0.575 used, 1.252 buff/cache
GiB Swap: 3.164 total, 3.164 free, 0.000 used. 0.979 avail Mem

PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND
32451 system 20 0 328.1m 12.8m 12.5 0.6 0:00.19 S synoscgi_SYNO.Core.System_1_info
32464 root 20 0 0.0m 0.0m 12.5 0.0 0:00.19 Z [SYNO.Storage.CG] <defunct>
9607 root 20 0 0.0m 0.0m 10.5 0.0 10:52.85 S [md2_raid5]
27646 root 20 0 0.0m 0.0m 6.6 0.0 4:18.39 D [md2_resync]

root@XXXXXX:/usr/syno/bin# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid5 sdc5[4] sdb5[0] sde5[3] sdd5[2]
23427586368 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
[>....................] recovery = 2.0% (162459700/7809195456) finish=1164.8min speed=109411K/sec

md3 : active raid0 sda1[0]
1000196800 blocks super 1.2 64k chunks [1/1] [U]

md1 : active raid1 sdc2[1] sdb2[0] sdd2[2] sde2[3]
2097088 blocks [5/4] [UUUU_]

md0 : active raid1 sdc1[1] sdb1[0] sdd1[2] sde1[3]
2490176 blocks [5/4] [UUUU_]

unused devices: <none>
root@XXXXXX:/usr/syno/bin# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid5 sdc5[4] sdb5[0] sde5[3] sdd5[2]
23427586368 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
[>....................] recovery = 2.0% (162937796/7809195456) finish=1180.6min speed=107938K/sec

md3 : active raid0 sda1[0]
1000196800 blocks super 1.2 64k chunks [1/1] [U]

md1 : active raid1 sdc2[1] sdb2[0] sdd2[2] sde2[3]
2097088 blocks [5/4] [UUUU_]

md0 : active raid1 sdc1[1] sdb1[0] sdd1[2] sde1[3]
2490176 blocks [5/4] [UUUU_]

unused devices: <none>

This is telling me that it will take 1000 minutes or just 16 Hours to complete!
What a difference!
dru
I'm New!
I'm New!
Posts: 2
Joined: Sat Nov 05, 2016 6:02 pm

Re: How to stop Indexing Service

Postby dru » Sat Nov 05, 2016 9:59 pm

The indexing started back up because there was activity in the shared photo folder.
So I stopped it "hard" by using the Step #6 command below.
That finally fixed it!!

6. If it starts up again then do
/usr/syno/sbin/synoservice --hard-stop synoindexd

Return to “System Managment Mods”

Who is online

Users browsing this forum: No registered users and 1 guest