LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-13-2016, 07:14 AM   #1
fearghas
LQ Newbie
 
Registered: Jun 2016
Location: Dublin, Ireland
Posts: 3

Rep: Reputation: Disabled
Question LUKS Performance issue with DB TRN LOGS in RHEL 6.7 DB Server/Vmware/SSD Environment


I have a DB server setup I use for application/product performance testing.

The DB server RHEL environment is currently configured as follows:
- IBM x3650 M4 server
- RHEL 6.7 running on vmware ESXI 5.5
- internal disks + internal SSDs

Usually when configuring performance tests for the DB servers, I would configure the data files on local disk and the DB transaction logs (the usual bottleneck) on local SSD to see how far the application can be pushed.

The current application/product I'm testing has the DB server storage configured with LUKs.

While running performance load, I couldn't drive the SSD to anywhere near its limits.
At the same time, when watching mpstat I could see lots of IOWAIT time.
After a lot of going round in circles I discovered:

- when I moved the DB transaction logs to an unencrypted filesystem, on the same SSD, the IO/sec rate to the SSD doubled (and the IOWAIT time became negligible - all other storage areas were still configured with LUKS);

- when I moved the DB transaction logs back to a new LUKS configured filesystem on the same SSD, the SSD throughput/high IOWAIT problem came back.

LUKS proved to be the root of the performance issue.
Hence my question is:
- is there any config I can do to alleviate this issue/better configure my RHEL environment/kernel parameters for LUKS or do I just accept that if I use LUKS in a high-throughput environment and LUKS encryption/decryption can't keep up with storage throughput capacity, then such is life ?

[For info, I've done a lot of searching on this topic but I haven't found anything recent re LUKS performance.]
 
Old 06-14-2016, 06:27 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Do you have AES support in the processor? What does "grep aes /proc/cpuinfo" report? Intel's spec sheet just says, "Some products can support AES New Instructions with a Processor Configuration update," and encryption is going to be slow without that.
 
Old 06-15-2016, 03:40 AM   #3
fearghas
LQ Newbie
 
Registered: Jun 2016
Location: Dublin, Ireland
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you rknichols for taking an interest in this.
The response from the grep aes /proc/cpuinfo is as follows:
(output was repeated for each cpu)

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc
arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinl
ock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_
lm ida arat epb pln pts dts
 
Old 06-15-2016, 06:34 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by fearghas View Post
or do I just accept that if I use LUKS in a high-throughput environment and LUKS encryption/decryption can't keep up with storage throughput capacity, then such is life ?
Probably a matter of "suck it up".
The database is no doubt designed to expect direct I/O, and you've slapped a LUKS container in the way that intercepts every I/O and then [de-]mangles every bit that goes in either direction. Yeah, I know, it wasn't your choice - ain't life a bitch.

Maybe look to make sure you have passthrough defined for that guest, and "cryptsetup benchmark", but you may be just tinkering around the edges. If you can't get the I/O done in a timely manner, you gotta wait.
 
Old 06-23-2016, 07:48 AM   #5
fearghas
LQ Newbie
 
Registered: Jun 2016
Location: Dublin, Ireland
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the reply syg00. I did try configuring the server in passthrough. Vms wouldn't start afterwards so I had to undo it. Still looking at various doc to see if there's another way but I think it's leading to having to "suck it up" or else find an alternative solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL 6.5 performance issue wsb01 Linux - Newbie 21 10-24-2014 05:25 PM
Checking logs and performance of a Linux server yzT! Linux - Server 6 12-24-2013 05:46 AM
How can I use trim with luks+lvm on ssd? pengStudent Slackware 5 05-16-2013 11:15 AM
luks encryption on ssd deNiro Slackware 6 07-15-2011 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration