• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

new server, need optimization, high swap usage


Active member

I recently moved my websites to new dedicated server and need help optimizing it.

Dedicated server: Yes
SSD or SATA: 4x SSD in RAID10
RAID or non-RAID (and hardware or software) and if RAID what level: HW/RAID10
Memory: 64GB
CPU: Dual CPU HEX Core E5-2620 0 @ 2.00GHz
HTTP server used: Litespeed entperprise
PHP processor used: fcgi
version of PHP: 5.4
OpCode caching enabled: no
Memcached being used? no, i have xcache installed

I am noticing high swap usage and only 6% of the RAM being used.


Active member
I managed to set the value to 0 and swap is still at about 7% usage.

I restarted mysql and got these errors:
150113 1:14:45 [ERROR] /usr/sbin/mysqld: Sort aborted: Error writing file '/tmp/MYVMHTKN' (Errcode: 28)
150113 1:14:45 [ERROR] /usr/sbin/mysqld: Incorrect key file for table '/tmp/#sql_7d50_22.MYI'; try to repair it

/tmp dir is about 10% full.


Well-known member
I think swap usage 7% is quite normal with that much RAM, with 10% /tmp too

If you want to swap usage 0% you can try to disable swap :D *not reccomended*

How much your RAM usage right now?


Active member
Right now 6% RAM usage. My previous server lingered around 30% with occasional spikes and never used swap (it was not disabled).


Jim Boy

Well-known member
SWAP can be used by the server when idling. What happens is that it puts some of the Memory into SWAP, 'just in case', but it doesn't remove the data from regular memory. The level to which it does that is determined by swappiness. If you want to stop it, set swappiness to zero. But as it only writes during idle and doesn't remove anything from RAM, it should not be impacting on your system at all.


Active member
Bad news on this link, they use VB5 :D

Check the page size.
Maybe more ads, avatars, js, css on your current XenForo Site.
Install Full page caching for the guest.
Maybe varnish or LiteSpeed Caching.
1 ad, 8 avatars load on homepage
is that different add-on?
i thought that is what the LiteSpeed Cache XenForo addon was for above?

XF needs its own EVA2000 :D
I feel like I am not going anywhere even with SSDs and litespeed...


Active member
Oh someone mentioned my name :D

@dotpro while I am here, I don't do free optimisations on this forum. I'm hear because my Centmin Mod forums uses XF https://community.centminmod.com/ :D
Oh, good to know. Should I post on vb or your forum?

How much RAM have you dedicated to Mysql?
This is what my.cnf looks like:

# safe-show-database
key_buffer_size = 12G
query-cache-type = 1
query-cache-size = 128M