How to set Apache start at boot time on Linux
If you feel lazy to restart the httpd service everytime your machine boot up, just do following simple steps:
- Enter below command to show the runlevel information of the httpd service
chkconfig –list | grep httpd
- You get something like this:
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
- Then, set up httpd to start at boot time.
chkconfig httpd on
- Now to can verify by reviewing the runlevel information of the httpd service
chkconfig –list | grep httpd
- Output should be.
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- You’ve done !
If you just want to enable the servive for a certain runlevel (e.g. graphic mode or non graphic mode), you can use below command instead where 3 indicates the runlevel.
- chkconfig –level 3 httpd
This method can be applied to enable/disable other services at boot time. So, to list available services on your machine, run the command:
- chkconfig –list
Thanks http://www.linuxforums.org for this simple solution.
AMD Opens Up Heterogeneous Computing
“…
HSA, which until recently was know as the Fusion architecture, is AMD’s platform design for integrating CPU and GPU cores onto the same chip. But HSA is more than AMD’s attempt to define an architecture for internal use, as was the case for Fusion. Rather HSA is an open specification that AMD wants the industry to adopt as the de facto platform for heterogenous computing…”
For full article, visit this link: http://www.hpcwire.com/hpcwire/2012-02-09/amd_opens_up_heterogeneous_computing.html
DDN solutions now available through Penguin Computing
DataDirect Networks (DDN) has announced that Penguin Computing has signed an agreement to offer DDN’s award-winning suite of HPC and Big Data storage solutions to its global customer base. Effective immediately, customers will be able to source DDN products from Penguin Computing, including the SFA storage platforms, the GRIDScaler and EXAScaler parallel file storage systems, NAS Scaler, DDN’s enterprise scale-out NAS platform, and WOS, the company’s hyperscale object storage system.
For full article, visit here: http://www.scientific-computing.com/news/news_story.php?news_id=1651
OpenCL Gains Ground On CUDA
As the two major programming frameworks for GPU computing, OpenCL and CUDA have been competing for mindshare in the developer community for the past few years. Until recently, CUDA has attracted most of the attention from developers, especially in the high performance computing realm. But OpenCL software has now matured to the point where HPC practitioners are taking a second look.
For full article, please visit:
http://www.hpcwire.com/hpcwire/2012-02-28/opencl_gains_ground_on_cuda.html
The Portland Group Ships OpenCL Compiler for Multi-core ARM
PORTLAND, Feb. 28 — The Portland Group (PGI), a wholly-owned subsidiary of STMicroelectronics and the leading independent supplier of compilers and tools for high-performance computing, today announced the general availability of the PGI OpenCL framework for ARM-based ST-Ericsson NovaThor platforms. The framework includes a PGI OpenCL compiler for multi-core ARM CPUs as a compute device and complements OpenCL for GPUs. NovaThor is a highly integrated complete mobile product platform with performance and power optimized multi-core ARM Cortex™ A-series CPUs, advanced graphics processors, powerful multimedia engines, and the latest mobile broadband and connectivity technologies. With this announcement, The Portland Group extends its product line to encompass both OpenCL and multi-core ARM-based microprocessors.
For full article, please visit:
Facebook Shakes Hardware World With Own Storage Gear
Just read the article “Facebook Shakes Hardware World With Own Storage Gear” at www.wired.com. As a fast growing company as Facebook, such hardware requirements are obviously. However, reading through the commends of this article is kind of fun.
“Facebook already built its own data center and its own servers. And now the social-networking giant is building its own storage hardware — hardware for housing all the digital stuff uploaded by its more than 845 million users.
…
Like the web’s other leading players — including Google and Amazon — Facebook runs an online operation that’s well beyond the scope of the average business, and that translates to unprecedented hardware costs — and hardware complications. If you’re housing 140 billion digital photos, you need a new breed of hardware.
In building its own data center on the Oregon high desert, Facebook did away with electric chillers, uninterruptible power supplies, and other terribly inefficient gear. And in working with various hardware manufacturers to build its own servers, the company not only reduced power consumption, it stripped thee systems down to the bare essentials, making them easier to repair and less expensive. Frankovsky and his team call this “vanity free” engineering, and now, they’ve extended the philosophy to storage hardware….”
For full article, visit this link http://www.wired.com/wiredenterprise/2012/02/facebook-builds-storage-gear
Linux shell scripting: /bin/sh : bad interpreter: No such file or directory
- Open the script using vi program
vi /path/to/scriptfile
- When file is opened, change the format of the script to the right one by entering
: set fileformat=unix
or just simply
: set ff=unix
- Finally, save the script for the new format taking effect and exit the vi program by entering
: x
How to fix: locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory
You got the message “locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory” when using locate command ?
To fix it just simply use updatedb command.
For example:
[root@xyz ]# locate lan.vu
[root@xyz ]# locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory
[root@xyz ]# updatedb
[root@xyz ]# locate lan.vu
/home/lan.vu
CPU affinitity – Why need and How to ?
CPU affinity ( or processor affinity ) is an ability provided by operating systems such as Windows or Linux that allows you to select specific CPUs or processors to run your program/application on. In a multi-core and multi-processor system, the assignment of a process to a CPU/processor is automatically decided by the OS via its scheduler. However, you still can interfere in this scheduling task by specifying a CPU that your program will be run on.
Why CPU affinity is needed ?
You may ask “Why do I need it if OS is hanlding everything for me?”. You are right. In most cases, you won’t need this function. However, if the runtime performance is your concern, in some cases, it’s worth a try to decide whether to use CPU affinity. For demonstration, I wrote a simple parallel program doing some computations using multi-cores. When I ran this program on a 12-core machine (two prossesors , six cores per processor) with/without CPU affinity, I got below runtime performance.
CPU affinity improves the runtime performance because it optimizes cache performance by reducing cache miss. In a NUMA system, setting CPU affinity and allocating memory also on the faster RAM can speed up the process as well.
How to ?
There are two ways to set the CPU affinity in both Linux and Windows.
In Windows:
Method 1: Set the CPU affinity using Task manager
- Open Task manager by pressing Ctrl + Alt + Delete and selecting the Task manager
- Select Processes tab
- Right click on the process that you want to set CPU affinity
- Select “Set affinity…” from the drop down menu
- Set the CPUs that you want your program to run on
Method 2: Second, program from your source code
You can use the Windows API SetProcessAffinityMask to set the CPU affinity from your program code
In Linux:
Method 1: Launch the program from the command line using settask
The below command will launch gedit in CPU 1 & 4 (or 0 and 3).
taskset -c 0,3 gedit
Method 2: Second, program from your source code
You can use the function sched_setaffinity in sched.h to manage CPU affinity from your code