How to stop Indexing Service

Questions and mods regarding system management may go here
Forum rules
Synology Community is the new platform for the enthusiasts' interaction, and it will soon be available to replace the Forum.

Was this post helpful?

Yes
2
100%
No
0
No votes
 
Total votes: 2

dru
I'm New!
I'm New!
Posts: 2
Joined: Sat Nov 05, 2016 6:02 pm

How to stop Indexing Service

Unread post by 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]

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]

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]

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

Unread post by 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

Smartypants
I'm New!
I'm New!
Posts: 2
Joined: Tue Feb 06, 2018 10:31 pm

Re: How to stop Indexing Service

Unread post by Smartypants » Fri Mar 23, 2018 7:48 pm

How about a solution for NON-nerds?

And please don't say something like "there really is no other way to force-stop indexing... It must be done from either a terminal window with the commands I gave in my examples, or via SSH".

This is not a solution for non-geeks.

Please give normal instructions for getting the "Indexing media files..." message to stop! It never ends - yet new media files I add to subdirectories under my shared folders - ARE NOT BEING INDEXED - and I don't see them in VideoStation...

Waiting for a simple solution.

Thanks.

User avatar
eaz
Specialist
Specialist
Posts: 1157
Joined: Sun Mar 04, 2007 9:04 pm

Re: How to stop Indexing Service

Unread post by eaz » Sat Mar 24, 2018 9:27 am

I recall you can pause/delay the indexing from the right top of the desktop. If you do this a couple of times, it could be a workaround.
Please share if a reply was useful or how the issue was solved, it helps other DS users.

DS415+ (4TB HGST+ 4TB Seagate raid1 + 2*480GB SSD raid1), DS212+ (2*WD red 2TB), previous DS411J, DS106

Post Reply

Return to “System Managment Mods”