Sunday, September 09, 2007

Corporate blogging.

Blogging turns out to become a more widely used marketing tool for companies. Not only big companies are starting to use corporate weblog solutions but it also enables smaller companies to enhance there online marketing with weblogs. In most cases people from management and the thought leaders of companies are asked to maintain a corporate weblog. In some cases the bloggers are completely free in what they place on there weblog in most cases the bloggers are support by marketing teams who help them create there posts and keep a eye on the corporate value of a post.

In general there are some things to keep in mind when starting a corporate or non-corporate weblog.

- Transparency is Key
- Develop a Community
- Be Consistent
- Make a Policy
- Be Committed
- Acknowledge Faults and Missteps
- Take the Good with the Bad
- Ensure Weblog Usability

Keeping these guidelines in mind will help you to make a success of your corporate weblog. Companies can benefit from weblogs in several ways. They get more exposure which is in the opinion of a marketing department always a good thing, they have the ability to give thought leaders a platform to expose the knowledge they have a so show what knowledge the company has itself. There is a option to create a community of devoted readers and get feedback from this community. And those are just some of the advantages that are there. Also a big plus is that most bloggers get a hang of it and start to enjoy it and after some time do not consider this as part of a job but more part of fun.


Some good examples of corporate weblogs can be found here:
MacroMedia corporate weblog: http://weblogs.macromedia.com
Sun microsystems corporate weblogs: http://blogs.sun.com/
Weblogs from people working at IBM development: http://www-128.ibm.com/developerworks/blogs/


As this trend is getting more and more speed there is also done more research, please find some interesting research papers here:

A research paper from Durbin Media Group: CORPORATE PRIMER ON BUSINESS BLOGGING
E-Business Consortium, University of Wisconsin-Madison : Corporate Weblogging Best Practices
Lewis 360 : the business value of blogging
Bloomberg Marketing : Blogs: Beyond A Corporate Handshake

Sunday, August 26, 2007

Tracking containers.


The world is a very different place out beyond the horizon. Even as you read this, there are some 40,000 large cargo ships plying the world's waterways and oceans, not to mention innumerable smaller merchant craft, all pulling in and out of ports, loading, unloading, changing out crews and cargos, and steaming from one location to the next.

In what can be a very murky world of shadowy ship registry offices, lengthy manifests, and dockhands who change out faster than Barbosa's crew, how all these ships come by their cargo, how that cargo is loaded, by what polyglot seamen and in what untamed ports, can be an amazingly scrambled and trackless story rivaling the Pirates of the Caribbean.

Scenario: A single ship starts out in Singapore with containers filled with electronics, passes through Indonesia where it picks up spices, sails to Calcutta to load cotton, Port Said where it boards an Egyptian crew, Piraeus where it stops for fuel, Tangier where it picks up leathers, Scotland where it packs in woolen sweaters, and finally sets sail for Newark, New Jersey. Eleven million containers packed with such goods reach U.S. ports every year.

At any point in a merchant ship's journey, pry open container XYZ mid-ocean, and what might you find? When you can't be sure, that spells danger. The possibility that a single container has gone purposefully astray and might now be packed with explosives, or loaded with a virulent biologic destined for our shores, is not a fictional scenario. (In 1988, it was an Al Qaeda merchant ship that delivered the materials needed to bomb U.S. embassies in Tanzania and Kenya. That same ship was never seen again.)

Given lots of time, customs agents could find all contraband. But, in the world of maritime shipping, time is the enemy. Try delaying a delivery, and you may face some rough characters down at the docks (think On the Waterfront). What's more, anything that hinders the swift transit of goods around the world can have a rippling effect on the world's economy.

MATTS -- DHS S&T's Marine Asset Tag Tracking System -- is a miniature sensor, data logging computer, radio transceiver, and GPS tracking system integrated into a compact and inexpensive black box, about the size of a deck of cards. Affixed to a shipping container, MATTS can use its on-board GPS chip to estimate its location if the GPS signal is lost. And, in the final version of the system, containers outfitted with MATTS tags will be able to transmit through shipboard communications systems, even if they are placed deep below deck. The tag's signal will "jump" from container to container until it finds a path it can use. Better yet, this black box stores its location history and reports it back when in range (up to 1 km) of an Internet equipped ship, container terminal, or a cell phone tower. At any point in a container's journey, its history can be examined, and if anything has gone amiss, authorities know instantly to scrutinize that particular container.

Ultimately, MATTS will be integrated with S&T's Advanced Container Security Device. The ACSD sends an alert through MATTS when a container has been opened or tampered with on any side, providing even more security.

"MATTS will globally communicate in-transit alerts to Customs and Border Protection, and this capability satisfies a high-priority CBP requirement," says Bob Knetl, Program Manager for the MATTS research within S&T's Borders and Maritime Division.

In late April 2007, one hundred MATTS-equipped containers started out in the Port of Yokohama, Japan, and are now making their trans-Pacific crossing to the Port of Los Angeles/Long Beach, where they will then continue by rail to the Rochelle, Illinois, Rail Terminal and be unloaded and trucked to their final destination. This test, ending in August, will demonstrate that the communications can be used internationally (in this case, by Japan's Ministry of Land, Infrastructure and Transportation) and that transitioning to domestic drayage once portside in Long Beach also runs smoothly.

MATTS was developed under a DHS S&T Small Business Innovation Research (SBIR) contract by iControl Incorporated, a small Santa Clara, CA-based company.

"A serious threat is posed by the cargo that containers may hold," says Vinny Schaper, SBIR Program manager. "We have to view the ocean with grave concern, and realize that a maritime attack is not beyond the realm of possibility and if it comes, it will probably involve the use of merchant ships. Eleven million containers a year are brought onto our docks. Interrupt this with a terrorist attack, and the backup would reach around the world."

Note: This story has been adapted from a news release issued by US Department of Homeland Security.



Thursday, August 09, 2007

MIT wins Marconi Prize.

MIT Professor Ronald L. Rivest, who helped develop one of the world's most widely used Internet security systems, has been named the 2007 Marconi Fellow and prize-winner for his pioneering work in the field of cryptography, computer and network security.

Rivest, the Andrew and Erna Viterbi Professor in MIT's Department of Electrical Engineering and Computer Science, will receive the award and accompanying $100,000 prize at the annual Marconi Society Award Dinner on Sept. 28 at the Menlo Circus Club in Atherton, Calif.

The Marconi Society, established in 1975 by Gioia Marconi Braga, annually recognizes a living scientist who, like her father Guglielmo Marconi, the inventor of radio, shares the determination that advances in communications and information technology be directed to the social, economic and cultural improvement of all humanity.

"Ron Rivest's achievements have led to the ability of individuals across the planet--in large cities and in remote villages--to conduct and benefit from secure transactions on the Internet," said Robert Lucky, chairman of the nonprofit Marconi Society.

The group cited Rivest's advances in public-key cryptography, a technology that allows users to communicate securely and secretly over an insecure channel without having to agree upon a shared secret key beforehand.

"Public key cryptography has flattened the globe by enabling secure communication via e-mail, web browsers, secure shells, virtual private networks, mobile phones and other applications requiring the secure exchange of information," Lucky said.

A native of Niskayuna, N.Y., Rivest attended Yale University, where he earned a B.S. in mathematics in 1969. After receiving his Ph.D. in computer science from Stanford in 1974, Rivest accepted an offer to join the faculty at MIT.

At MIT he met two colleagues, Leonard Adleman and Adi Shamir, who would become his partners in solving the puzzle of public-key cryptography.

"Ron is a very special person," said Adleman. "He has a Renaissance quality. If tomorrow he discovered an interest in rocketry, then in five years he would be one of the top rocket scientists in the world."

Fortunately, what captured Rivest's imagination was the challenge of a public key encryption system. He managed to enlist Adleman and Shamir in his quest to produce what he called an "e-crypto system." It was a challenge ideally suited to Rivest's mathematical interests, relying on what Adleman calls "some of the oldest and deepest mathematics, going back to antiquity."

In public key cryptography, there are two keys; one known to everyone, and one known only to the recipient. The public and private keys are paired in such a way that only the public key can be used to encrypt messages and only the corresponding private key can be used to decrypt them. But even if someone knows the public key, it is effectively impossible to deduce the private key. To design such a system was the challenge. In effect, it was a mathematical puzzle.

The RSA encryption algorithm that Rivest, Shamir and Adleman developed relies on the challenge of factoring large numbers (typically 250 or more digits long), a problem that has stumped the world's most prominent mathematicians and computer scientists for centuries.

At one end of the "conversation," the receiving party's computer secretly selects two prime numbers and multiplies them to create a "public key" which can be posted on the Internet. On the other end, the sending party's computer can take that key, enter it into the RSA algorithm and encrypt a message.

The genius of the scheme is that only the recipient knows the prime factors that went into the creation of the public key--and that is what is required by the RSA algorithm to decipher the message. Even though others can see the encrypted message and the public key, they cannot decipher the message because it is impossible to factor the number being used in the public key within a reasonable period of time.

The team developed its system in 1977 and founded RSA Data Security in 1983. RSA was acquired in 1996 by Security Dynamics, which in turn was acquired by EMC in 2006. Rivest has continued his work in encryption and is the inventor of the symmetric key encryption algorithms RC2, RC4, RC5, and co-inventor of RC6.

looking at adds



How do consumers look at advertisements? Most marketing textbooks advance the theory that looking at ads is a predominantly "dumb process," driven by visual stimuli such as the size of the ad or the color of the text.

However, new research by researchers from the Netherlands and the University of Michigan uses eye-tracking software to reveal that it may be our goals -- the tasks we have in mind -- that drive what we pay attention to, even during a few seconds of ad exposure.

In the August issue of the Journal of Consumer Research, Rik Pieters (Tilburg University, The Netherlands) and Michel Wedel (University of Michigan) perform an eye tracking experiment on 220 consumers. The consumers are split into four groups, each with a different goal, and given free rein to view a series of advertisements.

The study is self-paced -- that is participants are allowed to look at the ads for as long or as short of a time as they would like. Overall, the participants looked at the 17 target ads in the study for an average of about 4 seconds only -- but with notable differences in focus.

Those asked to memorize the ad focused on both the body text and the pictorial representation of the product. Those asked to learn about the brand, on the other hand, paid enhanced attention to the body text but simultaneously ignored the pictorial.

This supports the Yarbus thesis that ad informativeness is goal-contingent. Differences in pupil diameter between ad objects but not between processing goals reflect the pupil's role in maintaining optimal vision.

"The fact that even during the few seconds of self-paced ad exposure, attention patterns already differ markedly between consumers with different goals underlines the importance of controlling and knowing consumers' processing goals in theory building and during advertising pre- and post-testing," the researchers write.

In other words, the eyes are a reflection of consumer goals.

Reference: Rik Pieters and Michel Wedel. "Goal Control of Attention to Advertising: The Yarbus Implication," Journal of Consumer Research: August 2007.


Tuesday, July 31, 2007

Sun project FISHworks.

Shares of Sun Microsystems jumped close to 10 per cent in after-hours trading, as the hardware maker posted strong fourth quarter results. Longtime Sun followers, however, may be less moved by the figures since Sun relied more on cost-cutting than sales to improve its bottom line.

And now Sun is working on a new project called FISHworks. Project FISHworks is trying to create a netapp killer. The project is developing a new NAS solution like Netapp has at this moment. Currently the project is still "secret" or at least Sun is not telling much about it.... however, some details are already leaked out and believed to true. It will, most likely contain a ZFS file system and most likely it will contain DTrace. DTrace stands for Dynamic Tracing and helps you to trace bottlenecks on Solaris and make your system perform better.

Also it will most likely have a nice looking web GUI and a command line interface to administrate the system. For the rest.... we have to wait for more information from Sun.

Wednesday, July 04, 2007

Windows loses ground with developers

Microsoft's Windows platform is losing traction as a target for application developers in North America but still is the dominant platform, according to Evans Data survey results being released on Tuesday.

A survey this spring of more than 400 developers and IT managers in North America found that the number of developers targeting Windows for their applications declined 12 percent from a year ago. Just 64.8 percent targeted the platform as opposed to 74 percent in 2006.

"We attribute [the decline] largely to the increase in developers beginning to target Linux and different Linux [distributions]. Both Novell and Red Hat are the two dominant ones right now," said John Andrews, the CEO of Evans Data.

The arrival of Windows Vista likely only kept the numbers from being even worse. "I think Vista probably offset some of the decline," Andrews said.

The share for Windows is expected to drop another 2 percent, to about 63 percent, in the next year, Andrews said.

The targeting of Linux by developers increased by 34 percent to 11.8 percent. It had been 8.8 a year ago, according to the survey. Linux targeting is expected to reach 16 percent over the next year.

Evans views the situation as a battle of Windows versus open source with open source maturing, Andrews said. Windows remains tops, though. "They're still dominant, there's no doubt about it," said Andrews. Use of Windows on the development desktop remains steady.

The survey, featuring developers at enterprises and solution providers like system integrators, covered both client and server application development.

Evans Data said the shift away from Windows began about two years ago and is accelerating. Linux is benefiting as are nontraditional client devices. Evans Data also surveyed developer plans for such platforms as Unix and Mac OS but did not release those numbers.

A Microsoft representative said Monday no one was available from the company to comment on the Evans Data report.

Andrews said the verdict still is out on the full impact that open-source software is having on the commercial software market but noted that there will always be a place for both paradigms.

In other findings in the Evans Data Spring North American Development survey, Evans found that JavaScript is the most widely used scripting language. It has more than three times the users of PHP (Hypertext Preprocessor), Ruby, or Python. But Ruby usage is expected to increase by 50 percent within the coming year.

Also gathering steam is virtualization. A third of developers surveyed are writing applications that support virtualization with 42.5 percent expected to adopt it within the next year.

Original article done by Paul Krill and published on infoworld.com

Developing PHP multi database applications.

When developing a website or web enabled solution in PHP most developers do consider the fact that there database might be migrated to a newer version, what most do not consider is that they have to migrate to a completely different database platform. This might sound strange to some as they are developing there application for a specific database platform. However, when you develop a application which can be used at several sites you might not always be able to rely on the same database. Or in cases you are building a opensource or commercial solution you users might not always want to work with the database you have in mind. You might be developing your code on a Oracle 10G database while your customer thinks a Oracle database is overkill and wants to use a MySQL or PostgreSQL database.

For those who are not familiar with the three tier architecture, this architecture is describing the situation where you have a client, application server and a infrastructure server. The client is in a PHP web enabled solution a customer running a web browser, the application server is running a webserver with the PHP engine enabled. The infrastructure server is running a database. In the picture below you will see that all tiers are represented by a different server (or client pc). What you normally will see in not so critical environments is that the applications server and the database server are running on the same hardware platform.

When planning to build a PHP solution you might want to think about this problem and might plan in advance. To prevent that you need to write code for every possible database platform you will need to have a SQL translating engine in the middle. Even SQL is quite a standard language there are quite some differences between the database vendors SQL implementation.

You might consider to write your own SQL translator however there is a good opensource solution which can help you with this problem. ADOdb is a database abstraction library for PHP and will give you support on MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro, Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and generic ODBC, ODBTP. This enables you to write a single code pack to connect to all those “infrastructure” tiers instead of writing code for all those platforms.

Using the solution as shown above will prevent you from having the situation as shown here that you have to develop and maintain a large number of releases. Even do your developers will have to learn to adopt a new way of coding it will in the long run pay of when you decide to migrate to a different database platform or when you are working on a solution you will be distributing to customers. When you are developing

Tuesday, June 26, 2007

Oracle warehouse management and barcode scanners

I just received a box from one of our partners containing a Symbol barcode scanner. We have had a meeting with this partner to discuss the usability of handheld scanners in combination with Oracle E-business suite and even do we where convinced that this should work out of the box we still wanted to test this before we should consult our customers to purchase a curtain brand of scanner.

As a Oracle Applications service provider we also do have to consult our customers on what they should have as workstations and other hardware on site and not only focus on the server part in our datacenter.

In short I received a new Symbol scanner and a Zebra label printer to test on Oracle. Today, on day one, I have decided to start testing the barcode scanner. To my surprise this was much easier than I expected. The barcode scanner is, when scanning a barcode, taking the role of your keyboard. Nothing fancy about this, it simply puts the numbers and characters into the location where your cursor is at this moment. This might come not as a surprise to people who have worked and developed with a barcode scanner but if you are new to this it is quite cool to find out.

Also the setup of the entire scanner is quite straight forward, plugin your USB cable into a workstation, synchronize the scanner with the docking station by scanning the barcode on the docking station and you are in business. That is all there is to.

When starting my research I was planning on writing a deep technical blogpost on how you can enable barcode scanning with Oracle, the “problem” is that I can not write such an blogpost as there is nothing deep technical about.

Monday, June 04, 2007

Google techtalk from Rentrak about RDBMS


As commodity hardware becomes cheaper and more powerful it becomes tempting to reflexively use relational databases to track and report on large datasets. Rentrak argues the case that a pure-RDBMS solution can be counterproductive, especially for complex analysis of those datasets. I'll describe an alternate approach we currently use to track and report on video-on-demand and linear television viewership.

GPS data


Over the past two years, Microsoft has been gathering GPS data from volunteer drivers. Each driver has one of our recording GPS receivers on their dashboard for two weeks. So far, we have data from 227 drivers, comprising over 1.7 million time-stamped (latitude, longitude) points. This talk will give a brief overview of several different research projects we have completed based on this data. These projects include:

* Destination Modeling -- We characterize where and when people go and how quickly they fall into a rut of visiting very few new destinations. * Predestination -- We use our destination models to predict where a driver is driving as the trip progresses. * Snap-To-Road -- Inferring which road a driver is on is harder than just snapping to the nearest one. Our snap-to-road algorithm improves by accounting for the time stamps of the GPS data. * Personalized Routes -- We can plan routes that drivers prefer by looking at where they've already driven. * Location Privacy -- Can we protect the privacy of our volunteer subjects by simply anonymizing their data? We show it is possible to infer the identities of some of them from anonymized GPS data, and we demonstrate different strategies for protecting their privacy by corrupting the data.

Friday, June 01, 2007

google maps street view




Google has implemented a street view option in google maps. You are now able to "walk" in the streets of some of the major cities In America. The pictures are most likley taken with a 360 camera mounted on the top of a car while driving in the city. Also they have posted a very nice video on youtube which you can view here.


Oracle performance tuning and virtual memory.

When running Oracle e-business suite performance can be a problem. There a numerous of things you can check, do and tune to make your applications faster and enhance user satisfaction. Oracle e-business suite can be, depending on the modules you use, a large and resource demanding environment. As it will be in most cases the system your company is depending on to do the day to day business your users will demand a quick working system and they are not willing to spend hours and hours watching screens being buildup on their screens.

One of the things you might want to look at when running a Oracle database and or e-business suite in a UNIX/Linux environment is memory, both physical and virtual memory. Oracle loves memory even more than it loves CPU power, looking at your CPU load and memory use on a server running Oracle will show you that the use of memory can become quite extreme.

You can find an example of “top” on a simple server running a light installation of E-business suite.

10:43:22 up 252 days, 23:02, 6 users, load average: 0.61, 0.81, 0.72
735 processes: 734 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 2.4% 0.0% 2.9% 0.0% 0.0% 0.6% 93.8%
cpu00 2.5% 0.0% 1.1% 0.0% 0.0% 0.5% 95.6%
cpu01 0.3% 0.0% 0.1% 0.0% 0.0% 0.5% 98.8%
cpu02 5.1% 0.0% 7.3% 0.0% 0.1% 0.5% 86.7%
cpu03 1.7% 0.0% 3.1% 0.0% 0.0% 0.7% 94.2%
Mem: 3943852K av, 3598336K used, 345516K free, 450780K shrd, 50136K buff
Swap: 6729664K av, 1220512K used, 5509152K free 1594848K cached

The thing you basically want is that your operating system is not using swap space. Swap space in short is virtual memory which is not in one of your memory banks but is allocated on your file system. The problem is that if your physical memory is used completely your operating system will start to move not so intensively used parts “pages” of memory from your physical memory to your virtual memory. Virtual memory is located on disks and physical memory is located on your memory bank chips. This means that if your operating system is starting to use swap space it depends on the speed of your hard drives. A hard drive is still a lot slower than your memory banks so you will have a enormous performance drop.

In theory you could have a very small footprint of physical memory and have a large pool of virtual memory and run an Oracle instance. However this would mean that everything that can not fit into your physical memory space would be transported to your virtual memory space and this would mean that your disk will have to read/write for every request for memory. Every time a memory request is made and this specific page is in your virtual memory a disk request is made, the disk has to find it and have to return it to the requesting process. This method is much more time consuming than reading from the physical memory.

UNIX systems implement a global paging strategy. This means that the operating system will look at all processes on the system when is searching for a page of physical memory on behalf of a process. This strategy has a number of advantages, and one key disadvantage.

The advantages of a global paging strategy are:
(1) An idle process can be compleatly paged out so it does not hold memory pages that can be better used by another process.
(2) A global strategy allows for a better utilization of system memory; each process's page allocations will be closer to their actual working set size.
(3) The administrative overhead of managing process or user page quotas is completely absent.
(4) The implementation is smaller and faster.

The disadvantage of a global strategy is that is is possible for a single ill-behaved process to affect the performance of all processes on the system, simply by allocating and using a large number of pages.

A UNIX process can be conceptually divided into two portions; text and data. The text portion contains the machine instructions that the process executes; the data portion contains everything else. These two portions occupy different areas of the process's virtual address space. Both text and data pages are managed by the paging subsystem. This means that at any point in time, only some of the text pages and only some of the data pages of any given process are in RAM.

UNIX treats text pages and data pages differently. Since text pages are typically not modified by a process while it executes, text pages are marked read-only. This means that the operating system will generate an error if a process attempts to write to a text page. (Some UNIX systems provide the ability to compile a program which does not have read-only text: consult the man pages on 'ld' and 'a.out' for details.)

The fact that text pages are read-only allows the UNIX kernel to perform two important optimizations: text pages are shared between all processes running the same program, and text pages are paged from the filesystem instead of from the paging area. Sharing text pages between processes reduces the amount of RAM required to run multiple instances
of the same program. For example, if five processes are running Oracle Forms, only one set of text pages is required for all five processes. The same is true if there are fifty or five hundred processes running Oracle Forms. Paging from the filesystem means that no paging space needs to be allocated for any text pages. When a text page is paged
out it is simply over-written in RAM; if it is paged in at a later time the original text page is available in the program image in the file system.

On the other hand, data pages must be read/write, and therefore cannot (in general) be shared between processes. This means that each process must have its own copy of every data page. Also, since a process can modify its data pages, when a data page is paged out it must be written to disk before it is over-written in RAM. Data pages are written to specially reserved sections of the disk. For historical reasons, this paging space is called "swap space" on UNIX. Don't let this name confuse you: the swap space is used for paging.

The UNIX kernel is in charge of managing which data pages are in RAM and which are in the swap space. The swap space is divided into swap pages, which are the same size as the RAM pages. For example, if a particular system has a page size of 4K, and 40M devoted to swap space, this swap space will be divided up into 10240 swap pages.
A page of swap can be in one of three states: it can be free, allocated, or used. A "free" page of swap is available to be allocated as a disk page. An "allocated" page of swap has been allocated to be the disk page for a particular virtual page in a particular process, but no data has been written to the disk page yet -- that is, the corresponding memory page has not yet been paged out. A "used" page of swap is one where the swap page contains the data which has been paged out from RAM. A swap page is not freed until the process which "owns" it frees the corresponding virtual page.

On most UNIX systems, swap pages are allocated when virtual memory is allocated. If a process requests an additional 1M of (virtual) memory, the UNIX kernel finds 1M of pages in the swap space, and marks those pages as allocated to a particular process. If at some future time a particular page of RAM must be paged out, swap space is already allocated for it. In other words, every virtual data page is "backed with" a page of swap space. An important consequence of this strategy is if all the swap space is allocated, no more virtual memory can be allocated. In other words, the amount of swap space on a system limits the maximum amount of virtual memory on the system. If there is no swap space available, and a process makes a request for more virtual memory, then the request will fail. The request will also fail if there is some swap space available, but the amount available is less than the amount requested.

There are four system calls which allocate virtual memory: these are fork(), exec(), sbrk(), and shmget(). When one of these system calls fails, the system error code is set to EAGAIN. The text message associated with EAGAIN is often "No more processes". (This is because EAGAIN is also used to indicate that the per-user or system-wide process limit has been reached.) If you ever run into a situation where processes are failing because of EAGAIN errors, be sure to check
the amount of available swap as well as the number of processes.


If a system has run out of swap space, there are only two ways to fix the problem: you can either terminate some processes (preferably ones that are using a lot of virtual memory) or you can add swap space to your system. The method for adding swap space to a system varies between UNIX variants: consult your operating system documentation or vendor for details.

UNIX systems implement, and the Oracle server uses, shared memory. In the UNIX shared memory implementation, processes can create and attach shared memory segments. Shared memory segments are attached to a process at a particular virtual address. Once a shared memory segment is attached to a processes, memory at that address can be read from and written to, just like any other memory in the processes address space. Unlike "normal" virtual memory, changes written to an address in the shared memory segment are visible to every process that has attached to that segment.

Shared memory is made up of data pages, just like "conventional" memory. Other that the fact that multiple processes are using the same data pages, the paging subsystem does not treat shared memory pages any differently than conventional memory. Swap space is reserved for a shared memory segment at the time it is allocated, and the pages of memory in RAM are subject to being paged out if they are not in use, just like regular data pages. The only difference between the treatment of regular data pages and shared data pages is that shared pages are allocated only once, no matter how many processes are using the shared memory segment.

When discussing the memory usage of a process, there are really two types of memory usage to consider: the virtual memory usage and the physical memory usage.

The virtual memory usage of a process is the sum of the virtual text pages allocated to the process, plus the sum of the virtual data pages allocated to the process. Each non-shared virtual data page has a corresponding page allocated for it in the swap space. There is no system-wide limit on the number of virtual text pages, and the number of virtual data pages on the system is limited by the size of the swap space. Shared memory segments are allocated on a system-wide basis rather than on a per-process basis, but are allocated swap pages and are paged from the swap device in exactly the same way as non-shared data.

The physical memory usage of a process is the sum of the physical text pages of that process, plus the sum of the physical data pages of that process. Physical text pages are shared among all processes running the same executable image, and physical data pages used for shared memory are shared among among all processes attached to the same shared memory segment. Because UNIX implements virtual memory, the physical memory usage of a process will be lower than the virtual memory usage.

The actual amount of physical memory used by a process depends on the behavior of the operating system paging subsystem. Unlike the virtual memory usage of a process, which will be the same every time a particular program runs with a particular input, the physical memory usage of a process depends on a number of other factors.

First: since the working set of a process changes over time, the amount of physical memory needed by the process will change over time. Second: if the process is waiting for user input, the amount of physical memory it needs will drop dramatically. (This is a special case of the working set size changing.) Third: the amount of physical memory actually allocated to a process depends on the overall system load. If a process is being run on a heavily loaded system, then the global page allocation policy will tend to make the number of physical memory pages allocated to that process to be very close to the size of the working set. If the same program is run with the same input on a lightly loaded system, the number of physical memory pages allocated to that process will tend to be much larger than the size of the working set: the operating system has no need to reclaim physical pages from that process, and will not do so.

The net effect of this is that any measure of physical memory usage will be inaccurate unless you are simulating both the input and the system load of the final system you will be testing. For example, the physical memory usage of a Oracle Forms process will be very different if a user is rapidly moving between 3 large windows, infrequently moving between the same three windows, rapidly typing into a single window, slowly typing into the same window, or if they are reading data off of the screen and the process is sitting idle -- even though the virtual memory usage of the process will remain the same. By the same token, the physical memory usage of an Oracle Forms process will be different if it is the only active process on a system, or if it is one of fifty active Oracle Forms processes on the same system.

There are a number of key points to understand about the UNIX virtual memory implementation.

(1) Every data page in every process is "backed" by a page in the swap space. This size of the swap space limits the amount of virtual data space on the system; processes are not able to allocate memory if there is not enough swap space available to back it up, regardless of how much physical memory is available on the system.

(2) UNIX implements a global paging strategy. This means that the amount of physical memory allocated to a process varies greatly over time, depending on the size of the process's working set and the overall system load. Idle processes may be paged out completely on a busy system. On a lightly loaded system processes may be allocated much more physical memory than they require for their working sets.

(3) The amount of virtual memory available on a system is determined by the amount of swap spaces configured for that system. The amount of swap space needed is equal to the sum of the virtual data allocated by all processes on the system at the time of maximum load.

(4) Physical memory is allocated for processes out of the page pool, which is the memory not allocated to the operating system kernel and the buffer cache. The amount of physical memory needed for the page pool is equal to the sum of the physical pages in the working sets of all processes on the system at the time of maximum load.

One other thing you have to remember is that Swap partitions near the front of a hard disk (primary partition) have faster access time. Swap partitions on different harddisk attached to separate controllers allow linux to send the swap data to different destinations. Linux could start a program on one disk and use the swap space on a different disk. An other thing that can become handy when thinking about swap is to have the "rule" that your swap space has to be twice the size of your physical memory. For how much physical memory is required by you Oracle installation you have to check your installation guide on OTN or Metalink.


References:
- Oracle : “VIRTUAL MEMORY ON UNIX” Note:2060094.6
- Oracle : "Swap Space on RedHat Advanced Server" Note:225451.1

Tuesday, May 15, 2007

Difference between df and du

Under Linux / UNIX we have the du and the df command. The du command display disk usage statistics and the df command is to display free disk space.

In some cases it is possible that there is a difference between the outcome of df and du. In 99.9% of the cases this is caused by a lock on the file system. Meaning, if an application opens a file or files and an other application deletes these files while they are opened they will still be calculated by df.

The df command calculates this by looking at the inode table and the inode table has not yet released those files, meaning that, according to the inode table, the files are still using space on the disk.

Generally the solution is to stop/start the process that has a lock on those non existing files and the results returned by df and du will be the same again.

Friday, May 11, 2007

Nasa unveils Hubble's successor

he US space agency Nasa has unveiled a model of a space telescope that scientists say will be able to see to the farthest reaches of the universe.

The James Webb Space Telescope (JWST) is intended to replace the ageing Hubble telescope.

It will be larger than its predecessor, sit farther from Earth and have a giant mirror to enable it to see more.

Officials said the JWST - named after a former Nasa administrator - was on course for launch in June 2013.

The full-scale model is being displayed outside the Smithsonian National Air and Space Museum in the US capital, Washington DC.


The $4.5bn (£2.27bn) telescope will take up a position some 1.5 million km (930,000 miles) from Earth.

It will measure 24m (80ft) long by 12m (40ft) high and incorporate a hexagonal mirror 6.5m (21.3ft) in diameter, almost three times the size of Hubble's.

Hubble, launched in 1990, has sent back pictures of our solar system, distant stars and planets, and remote fledgling galaxies formed not long after the Big Bang.

But scientists say the JWST will enable them to look deeper into space and even further back at the origins of the universe. "Clearly we need a much bigger telescope to go back much further in time to see the very birth of the universe," said Edward Weiler, director of Nasa's Goddard Space Flight Centre.

Martin Mohan of Northrop Grumman, the contractor building the telescope, said that the team was making excellent progress. "There's engineering to do, but invention is done, more than six years ahead of launch," he said.

When ready, the JWST will be launched by a European Ariane V rocket. It is expected to have a 10-year lifespan.Until then, the 17-year-old Hubble telescope will continue to do its work. Nasa plans to send astronauts on the space shuttle to service it in 2008.

JWST is named after James E Webb, Nasa Administrator during the Apollo lunar exploration era; he served from 1961 to 1968 It will be placed 1.5m km from Earth, at Lagrange Point 2, an area of gravitational balance that keeps it in a Sun-Earth line The telescope will be shaded from sunlight by a shield, enabling it to stay cold, increasing its sensitivity to infrared radiation Three principal instruments will gather images of the Universe in the infrared region of the spectrum
These will yield new information about how stars and galaxies first formed a few hundred million years after the Big Bang

Thursday, May 10, 2007

Restore using mtx tar cat and grep

Quick and dirty,.... you have a taperobot and you would like to restore some things from the tar backup to you local file system.

The first step is to load the tape where the backup is located. To do so we have to give the tape robot the order to get the tape out of the slot and put it into the correct tapedrive. To do so we make use of mtx which can be used to control SCSI media changer devices.

pmeflr01 tape0 # mtx -f /dev/changer load 10 0

Where /dev/changer is the scsi location of the media changer, 10 is number of the disc and 0 is the number of the target tapedrive.

Now we have the correct tape in the tapedrive and we go to the location of the tapedrive in /dev/tapes/tape0 where we find “mt”.

pmeflr01 tape0 # ls -rtl
total 0
crw-rw-rw- 1 root root 9, 128 Jan 1 1970 mtn
crw-rw-rw- 1 root root 9, 192 Jan 1 1970 mtmn
crw-rw-rw- 1 root root 9, 64 Jan 1 1970 mtm
crw-rw-rw- 1 root root 9, 160 Jan 1 1970 mtln
crw-rw-rw- 1 root root 9, 32 Jan 1 1970 mtl
crw-rw-rw- 1 root root 9, 224 Jan 1 1970 mtan
crw-rw-rw- 1 root root 9, 96 Jan 1 1970 mta
cr-xr-xr-x 1 root root 9, 0 Jan 1 1970 mt
crw-r----- 1 root root 21, 7 Jan 1 1970 generic
pmeflr01 tape0 #

because we like to know what is on the tape and we like to have a list so we can later find all the files we like to restore we generate a list of all the items in the tar.

pmeflr01 tape0 # tar -tzf mt > /tmp/johan_restore

This will generate a file named johan_restore in /tmp which contains the complete index of all the files in the tar on the tape. We can now use cat and grep to pipe only the files we like to restore to a new file. For example if we only would like to have the files in /shares0/project-01 we execute the following command to generate a new file named johan_restore_grep in /tmp

pmeflr01 tape0 # cat /tmp/johan_restore | grep /shares0/project-01 > /tmp/johan_restore_grep

having this file we can now use this as a “restore index” in tar. The –T option with the tar command gives you the option to specify a file containing all the files that should be extracted. We issue the following command to restore all the data to /shares0/temprestore so we can review the restored data before we place it back to the original location on the file system and inform the users that the data is restored.

pmeflr01 tape0 # tar -xzf mt -v -T /tmp/johan_restore_grep -C /shares0/temprestore/

After this we will have a complete restore of the data in /shares0/temprestore, first check if everything is there and if that is the case move it to the original location and inform the users.