Question
· Oct 31, 2016

Slave Write Daemons

Good day! Can someone briefly explain or give me a link to documentation why in Linux Cache starts 8 Write Daemons (Main and 7 Slaves)? Thanks!

Discussion (7)1
Log in or sign up to continue

Hi, Alexey! Thanks for you answer!

But I'm not completely agree with it. My laptop has one physical drive /dev/sda and two logical volumes above it (home + root) plus /boot on /dev/sda1.  And I've met different production server disk configurations with the same 7 SWDs. Additionally, how we can comment the file descriptors opened by those 7 SWDs + 1 WD?

[root@HP-6360B ~]# for wd in `pgrep -f WD`;do ls -l /proc/$wd/fd | grep -v '/dev/null';done
total 0
l-wx------ 1 root root 64 Nov  1 08:09 3 -> /opt/intersystems/cache-2016.2/bin/clock
lrwx------ 1 root root 64 Nov  1 08:09 4 -> /opt/intersystems/cache-2016.2/mgr/CACHE.WIJ
lrwx------ 1 root root 64 Nov  1 08:09 5 -> /opt/intersystems/cache-2016.2/mgr/CACHE.DAT
lrwx------ 1 root root 64 Nov  1 08:09 6 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT
lrwx------ 1 root root 64 Nov  1 08:09 7 -> /opt/intersystems/cache-2016.2/mgr/cacheaudit/CACHE.DAT
lrwx------ 1 root root 64 Nov  1 08:09 8 -> /opt/intersystems/cache-2016.2/mgr/cache/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:09 3 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT
total 0
lrwx------ 1 root root 64 Nov  1 08:10 3 -> /opt/intersystems/cache-2016.2/mgr/cachetemp/CACHE.DAT

 

 

Some of WDs has opened CACHESYS, some  - CACHETEMP as well as the main WD which doesn't have to write to disk at all (I've met such statement).

Hi Mikhail,

The purpose of having multiple write daemons on non-Windows platforms is to improve the performance of the write daemon during the phase of the write cycle when database blocks get written to disk.  Having multiple write daemons (instead of just one) allows multiple I/Os to be performed simultaneously, thereby shortening the overall length of the write cycle.  Alexey’s earlier comment is partially accurate; in the past, allocation of database blocks to write daemons was done by database.  However, in recent versions, allocation of database blocks to write daemons has been altered to spread the workload more evenly across all write daemons, improving performance even further.

Ok, it was known that on non-Windows systems, used more then one write daemon. But why 8, and is it configurable somehow ? And as I know mgstat, shows activity of writedaemon, I understand and know how it looks like on Windows, but how it will looks like on Linux ? I think we need more information, about multiple write daemons, how they works.

Aaron, thanks for answer! But, yes, why are exactly 8 daemons? Why not 4 or 13? Is there a method to configure it ($zu or cstat, or smth else)? As I've read somewhere, a few daemons appear because Linux didn't support async IO. Is this still true? It would be great to clarify the exact role of the Main Daemon and Slave Daemons. What I already noticed that these daemons wake up every 10 seconds to check write daemon queue. I think this one is the general for all of them. It would be cool to get more information about their configuration.

Hi Mikhail and Dmitry,

 

I support your interests into this subject matter, and am glad you're finding the information useful. The write daemon is a topic which we would generally prefer to talk about one-on-one so we can get a deeper understanding of your individual questions, concerns, and business needs. Accordingly, if these are questions you would like to pursue, I would recommend opening WRC cases with our Support department so we can work more closely with each of you.