Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] squid swap space
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 870

PostPosted: Thu Aug 13, 2015 8:05 am    Post subject: [SOLVED] squid swap space Reply with quote

Hi,

I'd like to know if there's a way to foresee how much swap space I need to create so that a server running Squid for a few hundred users doesn't crash like in the log messages below:

Code:

2015/08/12 09:01:53 kid1| WARNING: nt_group #1 exited
2015/08/12 09:02:00 kid1| Too few nt_group processes are running (need 1/30)
2015/08/12 09:02:07 kid1| Starting new helpers
2015/08/12 09:02:09 kid1| helperOpenServers: Starting 1/30 'ext_wbinfo_group_acl' processes
2015/08/12 09:02:14 kid1| ipcCreate: fork: (12) Cannot allocate memory
2015/08/12 09:02:21 kid1| WARNING: Cannot run '/usr/libexec/squid/ext_wbinfo_group_acl' process.
2015/08/12 09:02:26 kid1| WARNING: nt_group #3 exited
2015/08/12 09:02:29 kid1| Too few nt_group processes are running (need 1/30)
2015/08/12 09:02:31 kid1| Closing HTTP port [::]:3128
2015/08/12 09:02:33 kid1| storeDirWriteCleanLogs: Starting...
2015/08/12 09:02:37 kid1|   Finished.  Wrote 0 entries.
2015/08/12 09:02:44 kid1|   Took 0.16 seconds (  0.00 entries/sec).
FATAL: The nt_group helpers are crashing too rapidly, need help!

Squid Cache (Version 3.3.13): Terminated abnormally.
CPU Usage: 318.690 seconds = 203.510 user + 115.180 sys
Maximum Resident Size: 1200704 KB
Page faults with physical i/o: 48699
Memory usage for squid via mallinfo():
        total space in arena:  535069 KB
        Ordinary blocks:       532529 KB   5770 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           836 KB      3 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:    2540 KB
        Total in use:          533365 KB 100%
        Total free:              2540 KB 0%
2015/08/12 09:02:50 kid1| Closing Pinger socket on FD 24


According to the Squid FAQ at http://docstore.mik.ua/squid/FAQ-10.html I should increase swap space. I just don't know how to estimate the amount I need.

Thanks,

Vieri


Last edited by Vieri on Thu Aug 13, 2015 8:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Thu Aug 13, 2015 8:21 am    Post subject: Reply with quote

I doubt anyone will say how much swap you probably need in your case.

There are too many unkown things to really know that...
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 870

PostPosted: Thu Aug 13, 2015 8:41 am    Post subject: Reply with quote

OK, thanks.

As a general guideline it seems that this rule may apply:

if MEM < 2GB then SWAP = MEM*2 else SWAP = MEM+2GB

I'll try that and see what happens.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Thu Aug 13, 2015 10:54 am    Post subject: Reply with quote

You can add swap files on fly. Just create a swap file and run swapon on it. Need more? Add another one.
_________________
Life is a tragedy for those who feel and a comedy for those who think.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum