• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Tuning OpenStack Server Instance (Ubuntu, HP Cloud)

By Abhishek Ghosh March 20, 2015 8:11 am Updated on March 20, 2015

Tuning OpenStack Server Instance (Ubuntu, HP Cloud)

Advertisement

Tuning OpenStack Server Instance Can Give Better Networking Performance and Better Security. Example is Given With Ubuntu Server on HP Cloud. As basically we work with virtual machines, stability of an instance is far lesser than a real machine. We have to compromise between performance and stability by trial and error method. The best way to exert a server load is to assign it to a dev domain and purchase cheaper real human traffic. This is practical and real life test and monitor the resource consumption, log files etc. No tool basically can emulate the real world situation. This Guide For Tuning OpenStack Server Instance is Intended For The Advanced Users Only. We are taking it granted that MySQL or any other database is running on separate server, we are tuning a Nginx webserver running PHP5-FPM, XCache with WordPress as Frond End web software. You are spinning up an instance from latest manual OpenStack Snapshot.

 

Tuning OpenStack Server Instance (Ubuntu, HP Cloud) : TCP

 

Default allocated TCP buffer sizes for Linux too small. We can know the value by running this command :

Vim
1
cat /proc/sys/net/ipv4/tcp_mem

For a 4 GB instance, this will give this kind of value :

Advertisement

---

Vim
1
94638 126184 189276

First we are providing you the commands with cat to get your default values. You can keep them as record, do the changes by editing the file, reload the sysctl.conf to to reflect the changes.

Vim
1
2
3
4
5
6
7
8
# socket memory
cat /proc/sys/net/core/rmem_default
cat /proc/sys/net/core/rmem_max
# send socket memory
cat /proc/sys/net/core/wmem_default
cat /proc/sys/net/core/wmem_max
# buffer
cat /proc/sys/net/core/optmem_max

We have to edit the file – /etc/sysctl.conf and then reload it by running sysctl -p command. Open with Nano :

Vim
1
nano /etc/sysctl.conf

There are many commented out lines. First, it is better to search with parameter within the file with ^ + W search function. If the line is not present, add it at the end of the file, write out and reload. These are the directions to be added.

Vim
1
2
3
4
5
6
7
8
9
net.core.wmem_max=12582912
net.core.rmem_max=12582912
net.ipv4.tcp_rmem= 10240 87380 12582912
net.ipv4.tcp_wmem= 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000

These are more than enough.

 

Tuning OpenStack Server Instance (Ubuntu, HP Cloud) : /proc filesystem

 

We have to edit the file – /etc/sysctl.conf and then reload it by running sysctl -p command. Open it with Nano and here is a sample parameters :

Vim
1
2
3
4
5
6
7
net.ipv4.ip_forward = 1
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

These are direct changes to VM (memory) subsystem. We could use the command sysctl to view and temporarily edit the values. In that case, when we would reboot, the changes would go away. As our instance itself is a snapshot, we can play without going through so many steps. Grammatically, that is the correct method for a Physical Machine.

Tuning-OpenStack-Server-Instance-Ubuntu-HP-Cloud)

 

Tuning OpenStack Server Instance (Ubuntu, HP Cloud) : Security and the Full File

 

This is a sample /etc/sysctl.conf file :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
kernel.exec-shield = 1
kernel.randomize_va_space = 1
# HP Cloud has no IPv6
# net.ipv6.conf.default.router_solicitations = 0
# net.ipv6.conf.default.accept_ra_rtr_pref = 0
# net.ipv6.conf.default.accept_ra_pinfo = 0
# net.ipv6.conf.default.accept_ra_defrtr = 0
# net.ipv6.conf.default.autoconf = 0
# net.ipv6.conf.default.dad_transmits = 0
# net.ipv6.conf.default.max_addresses = 1
# HP Cloud has no IPv6 above kept for future
fs.file-max = 65535
kernel.pid_max = 65536
net.ipv4.ip_local_port_range = 2000 65000
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 87380 8388608
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
net.core.netdev_max_backlog = 5000
net.ipv4.tcp_window_scaling = 1

 

Tuning OpenStack Server Instance (Ubuntu, HP Cloud) : Nginx Specific

 

These are applicable to either /etc/nginx/nginx.conf or /etc/nginx/sites-available/default (for one domain, one server setup) :

Vim
1
2
3
4
5
6
7
# session and simultaneous connections for a session
limit_zone slimits $binary_remote_addr 5m;
limit_conn slimits 5;
# Edit it, request to Host is only allowed
      if ($host !~ ^(thecustomizewindows.com|www.thecustomizewindows.com)$ ) {
         return 444;
      }

These are usually maximum. Hotlinking images sucks resources but also give a feeble backlink. For SEO reasons, it is better to allow some method. It is better to use CORS header and configure CDN to block the usage of CSS and Javascript by the others.

Tagged With tuning cloud server

This Article Has Been Shared 530 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Tuning OpenStack Server Instance (Ubuntu, HP Cloud)

  • Cloud Computing 3D Rendering And Scope In Film Industry

    Cloud Computing 3D Rendering Has Definite Scope in Film Industry which might alarm the Stars of tomorrow and relieve the Producers investing in the Films.

  • Juju on Rackspace Cloud Server : Test Drive with Ubuntu 12.04

    Juju on Rackspace Cloud Server is a test drive in real time. It is some what like driving a F1 car on a busy avenue for the first time in life. Start the Cloud. And the ride is too without wearing helmet – on an Operating System without any smartness – Windows 7 with PuTTY. […]

  • SaaS : Everything You Wanted To Know

    SaaS or Software as a Service is designed by the architecture to be used by the consumer. SaaS is the model oCloud which the general users mostly know to exist.

  • Cloud Computing Grown as There Was Real Demand From The Customers

    Cloud Computing grown as there was a clear cut demand from the consumer. Most users who cares for quality, actually went mad with the traditional web hosts. The crap graphics of cPanel, increasing bill for Virtual Private Server and Dedicated server, “your problem you will solve” type of mentality, usage of worst possible hardwares, all […]

  • Cloud Database : Migrating From Relational Database Model to NoSQL

    Cloud Database is more and being in use now than before. The question of migrating from relational database model to NoSQL Database is becoming more important.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Domain-Driven Design (DDD)? January 23, 2021
  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021
  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Tuning OpenStack Server Instance (Ubuntu, HP Cloud)," in The Customize Windows, March 20, 2015, January 23, 2021, https://thecustomizewindows.com/2015/03/tuning-openstack-server-instance-ubuntu-hp-cloud/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy