Iworx HTTPD tweaking

So I’ve noticed that logging into NodeWorx/SiteWorx takes a bit of memory on my system. I’ll go by the default amount of servers (MinSpareServers 4; MaxSpareServers 8; StartServers 8) for the following output:

After a fresh restart of the iworx service

##################################


             total       used       free     shared    buffers     cached
Mem:           985        636        349          0        113        346
-/+ buffers/cache:        176        809
Swap:         2047          0       2047


USER    %CPU    %MEM    TIME+    COMMAND
root    0.0    0.5    0:00.10    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web
iworx    0.0    0.3    0:00.00    iworx-web

After logging into NodeWorx and accessing a few pages

###############################################


             total       used       free     shared    buffers     cached
Mem:           985        902         82          0        113        346
-/+ buffers/cache:        443        542
Swap:         2047          0       2047


USER    %CPU    %MEM    TIME+    COMMAND
iworx    0.0    4.1    0:03.84    iworx-web
iworx    0.0    4.0    0:01.12    iworx-web
iworx    0.0    3.8    0:01.44    iworx-web
iworx    0.0    3.8    0:01.32    iworx-web
iworx    0.0    3.6    0:02.69    iworx-web
iworx    0.0    3.6    0:01.09    iworx-web
iworx    0.0    3.4    0:02.00    iworx-web
iworx    0.0    3.4    0:02.01    iworx-web
root    0.0    0.5    0:00.10    iworx-web

The values of memory usage will stay fairly constant after logging into the system until the iworx service is restarted or the iworx-web processes are killed (the child processes), which then re-spawn at the initial values. The traffic to NodeWorx/SiteWorx on my server is not heavy at all. I’m the only one logging into NodeWorx and my hosted clients are all from design projects, so I setup everything in their domain control panels, they rarely log in if at all. Ideally in this case, I would like to see iworx consuming as little resources as possible. Here are a couple things I’ve done to help the situation:

/home/interworx/etc/httpd/httpd-custom.conf Tweaking

#################################################

I’m still working on tweaking and testing but these values seem to work just fine without much noticeable difference in speed in my case:

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 1
MaxSpareServers 2
StartServers 2
MaxClients 32
MaxRequestsPerChild 1000

^= Less iworx-web processes to consume memory.

CSF/LFD Configuration or PRM?

#############################

The following is a setting I use in CSF/LFD firewall. I’m not sure if there is anything like this in R-fx scripts, PRM might do the job. However, what LFD will do is kill any process that runs over a specified time, if I configure that option. Any process can be ignored. I’ve already set iworx-db to be ignored but I have LFD kill iworx-web processes running under the iworx user (not the root process) after 6 hours. They immediately re-spawn at ~0.3% memory usage as opposed to continuously running at ~4.0%. Although I’m considering increasing this value to 12 hours since I’ve changed the StartServers and MaxSpareServers to 2.

This helps because if I happen to log into NodeWorx once at the beginning of a week, the iworx-web processes will not sit at ~4.0% memory usage without even being used again for 5-7 days or more.

After Tweaking Config and Logging In/Accessing Pages

###############################################


             total       used       free     shared    buffers     cached
Mem:           985        668        316          0        108        321
-/+ buffers/cache:        238        747
Swap:         2047          0       2047


USER    %CPU    %MEM    TIME+    COMMAND
iworx    0.0    4.1    0:03.58    iworx-web
iworx    0.0    3.8    0:03.55    iworx-web
root    0.0    0.5    0:00.14    iworx-web

Then surely, after LFD kills these processes after 6 hours they go back to the memory usage in the first 2 outputs in this post except only 2 iworx-web processes running under user iworx at ~0.3%.

But again, this may not work for everyone. I’m basing this off of my own personal usage of NodeWorx/SiteWorx and the very light traffic that my control panel gets from users on the system.

I’d like to have this open to any other suggestions or posts regarding your own experiences.

Regards,
:slight_smile:

Thanks for sharing your tips, Lightfoot!

I’ll have to check this out b/c 95% of my site are from design clients I also got hosting business for and most of those people do not use SiteWorx so its just me tool’n around in NodeWorx and looking at the pretty graphs :slight_smile:

These tips has brought memory usage for me, thank you! :slight_smile:

Glad to hear that it’s helped! :slight_smile: