Speeding up Magento Server Response a journey into High Performance

I have been working on quite a highly visited magento store by South African standards. The task is to improve the performance and response times inclusing the magento server response and page load of the site as that had never been a high priority. Furthermore lots of custom development and dare I say it magento module and even core overrides were made to the site.

So here is a pragmatic guide to analysing a magento 1.9 site for performance and a guide on how to speed up the site, specifically magento server response.

Lots of Variables

One of the most difficult things is actually isolating problems. There are many factors to take into account and many reason as to why the site is slow. There are so many interconnected parts that may be the bottleneck. It could be server hardware, non-optimised or index database, bad modules, web server configuration, file system read and writes, external scripts, render blocking js, location of the server and many other things.

Page Load Time vs Server Response Time

A very important thing to understand is the difference between server response time and page load time. As the ways to fix the problems are different in their natures.

Page load time is the time it takes to download and display the entire content of a web page in the browser window (measured in seconds). MaxCDN Page load time

Server response time is the amount of time it takes for a web server to respond to a request from a browser. Varvy server response time

When you request the webpage, the server starts building the page by querying the database and any external services for data and then building the page. That is your server response. So server response time is actually a constituent or subset of page load time.

Finding out if your Magento server response is irregular

The hardest part of making any findings is using a benchmarking or testing tool that is consistent and that does not depend on your network speed or some other factor. The best thing I have found for the magento server response test is the built in magento profiler used in conjunction with the AoeProfiler, which is a tool that makes readibility of the profiler much easier. Also you want to host the site locally. Fabrizio Branca describes how to setup the Aoe profiler.

Pitting your site against a standard magento with sample data at the same version

If your site is responding locally on any page with a response time of greater than 2000 ms you can safely say that something is wrong.

magento-profiler-long-response-time

If your response is not so high, then make sure your local site you are enhancing has cache off and test it against your local standard magento install with cache off. Also test with cache on and see if there is a dramatic difference (> 200ms)

If so you will need to profile your site as to why it has a slower server response

Profiling and Fixing your Magento Server Response

This is the most difficult part. So test your site against the standard magento with both cache on or both cache off, and test on the same pages. So wither home page/ cms page, product view page and category page.

Then expand the profiler and find any extra calls that are done on your site that aren’t done on the magento site. These are usually your bottlenecks. Also any big red blocks needs to be looked at in detail.

Now for the difficult part, you need to find out why these calls are made and best case remove these modules/inefficiencies. Second best is to fix these inefficiencies and also make sure that if cache is turned on and things are not caching you need to find you why.

Your first goal is to have similar server response times to the standard magento site.

The important thing to remember is everything after the server response is frontend and can be optimised, like stop render blocking js, minifying js and css and enahancing image load. The server response is the time where the user is waiting for content and is very important and recommended to aim for < 200ms.

Leveraging Cache

If cache is not turned on in your production site, you are losing a lot of the speed gains you should be getting. Just take note that cache needs to be warmed up so after clearing your cache folder var/cache the first request will be slow and subsequent request will be much faster.

The Cache settings are found at: System -> Cache Management

magento-cache-settings

I have done a few tests on my local craptop…using the built in php server. Remember to server the site with php -S vanilla.dev:4444 router.php so that the links work. More info on this post.

Cache is the top one, uncached is below.

Home screen:

magento-fresh-product-screen-cache-offmagento-fresh-product-screen-cache-on

Category Page:

magento-fresh-category-screen-cache-offmagento-fresh-home-screen-cache-on

Product Page:

magento-fresh-home-screen-cache-offmagento-fresh-category-screen-cache-on

So caching will at its worst will double the speed of the site normally, running locally. You may find when deploying to production environments that usually have more resources than your local pc the gain may halve.

So a 600 ms gain, will only be 300 ms on production environments.

Be wary of your custom templates not being cached

If you have a custom block for example MyModule/Block/Page/Html/TopMenu.php to override the standard top menu, but you are not using a template file called topmenu.phtml and have not made the correct provisions for this it will not be cached. For example you go and call your file megamenu.phtml and call $this->setTemplate('megamenu/page/html/megamenu.phtml).

That can really catch you out especially if it on a template that is on every page.

To check your blocks that are being cached you can use another great tool by Aoe called AoeTemplateHints, it will give you allot more information about your blocks and templates and is particularly good when looking at caching.

Reports: Should you turn it off?

The magento reports observer does add some time to the product view page magento server response time…about 50 – 150ms from my local testing.

reports-profiler

Right at the bottom of the image is OBSERVER: reports

There is a gist that gives you the instructions, but rather add those changes in config.xml: I have tested locally and it removes that time from

 

 

 

Google Pagespeed Insights

Low Hanging Fruit

Caching

Flat catalog and product page

Kibana using lots memory

Is Digital Oceans 1-click-deploy ELK stack poorly configured on purpose?

Kibana is using too much memory

I wanted to see what juicy stats and info I could get out of the logs some of my servers were creating. Eventually I ran into the kibana using lots memory error. But I went through the Install ELK on ubuntu 14.04 tutorial and all was well but the certificate  creation didn’t go too well so when filebeat and topbeat was installed on the client they would not restart and give an error:

ERR SSL client failed to connect with: dial tcp my.fqdn.co.za:5044: i/o timeout

So it turned out to be a mission so I resorted to using the One click install image tutorial and it worked like a charm.

I started with a 1Gb droplet and that gave issues like logstash just stopping, elasticsearch just stopping and kibana just stopping. So you had to restart and then after a while it still wouldn’t work.

Kibana node memory keeps increasing

So I moved to the 2Gb droplet and added it to newrelic so I could see what was ccasuing these problems. And I think I have found the culprit:

node-using-memory-elk-stack

As you can see node just starts going out of hand from the start until it runs out of memory.

So is Digital ocean deliberately leaving this issue / not configuring this issue so that you go for a more powerful droplet. They are in the business of making you use more VPS’s.

But I digress…

Node is the kibana part of the ELK stack and this issue has been highlighted without a clear answer (like always) on Github and another one

But suggestions are saying add this to bin/kibana at the top:

NODE_OPTIONS="--max-old-space-size=250"

On the one click install that is located at:


/opt/kibana/bin/kibana

and it should look like:


NODE_OPTIONS="${NODE_OPTIONS:=--max-old-space-size=500}"
exec "${NODE}" $NODE_OPTIONS "${DIR}/src/cli" ${@}

I will implement this and let you know the results

Update (The following day)

kibana-rising-then-restarting

So I set the limit to 500 and duely it restarted at 440 mb used, according to this graphic:

kibana-usage-max-500mb

So summing up it may be possible to run this on a 1Gb RAM droplet.

The java instance for logstash runs at about 250mb max memory usage. Java for elasticsearch seems to max at 600 mb but maybe that is just because of the amount of data it has to search through / keep in memory. I’m also not sure if you can limit this amount. Filebeat uses about 15mb max. Rsyslog uses about 10mb.

So can you run the ELK stack on a 1Gb droplet?

Processes and Memory being used on the ELK stack

User Process Count CPU Memory
elasticsearch java 1 8.5% 564 MB
kibana node 1 0.4% 325 MB
logstash java 1 3.8% 239 MB
root java 1 81.1% 154 MB
root apt-get 1 7.5% 42.6 MB
root filebeat 1 0.0% 12.6 MB
root fail2ban-server 1 0.0% 9.37 MB
syslog rsyslogd 1 0.0% 7.96 MB
www-data nginx 4 0.0% 6.16 MB
newrelic nrsysmond 2 0.1% 5.43 MB
root vim 1 0.0% 5.21 MB
root bash 1 0.0% 3.72 MB
root sudo 1 0.0% 2.03 MB
root init 1 0.0% 1.71 MB
root sshd 1 0.0% 1.62 MB
sshd sshd 1 0.0% 1.4 MB
root nginx 1 0.0% 1.09 MB
root getty 6 0.0% 944 KB
messagebus dbus-daemon 1 0.0% 820 KB
root systemd-udevd 1 0.0% 739 KB

So the total excluding kibana is: 1059.75 mb

Well it looks like we are over budget as it stands. I will keep monitoring.

Making the ELK Stack run on a 1Gb Droplet (Update)

Well we can see that we can stop Kibana going out of control on the memory side. Now that try save some money by limiting it so it only needs a 2Gb droplet.

We are going to limit Kibana to 250Mb and Elasticsearch to 500Mb and hopefully everything goes smoothly. To change the limit on elasticsearch memory change: /etc/default/elasticsearch

Add the following:


ES_HEAP_SIZE=512m

That is what I had the best success with. Although there are additional steps outlined on stackoverflow.

So we will implement the above and wait until it safely runs under 1Gb memory, otherwise we are  going to flip the switch and just downgrade to 1Gb and reboot.

Update

We are still seeing the jaggered edges created by the periodic increase and dropping of kibana memory usage.

kibana-usage-still-dropping-and-climbing

And this is pushing over out 1Gb max. Also elasticsearch is using 650 mb of memory or there abouts when we have told it to use 512 max. Maybe it realises there is spare memory so I will be downgrading it now to a 1Gb droplet.

So far so good…the retrieval or records and visualisation generation in kibana is less speedy but I can deal with it. Here is the current memory situation:

kibana-on-1-gb-droplet screen-shot-2016-09-17-at-12-10-04-pm

Well that didn’t work…

Elasticsearch is still using > 512mb memory and logstash stops as soon as it starts. So if I set the heap size in sudo vim /etc/init.d/elasticsearch:

ES_HEAP_SIZE=256mb

“`

the elasticsearch service does not start…

Ah you need to also edit sudo vim /etc/elasticsearch/elasticsearch.yml

and add the following:


bootstrap.memory_lock: true

I will continue monitoring stability

Update

 Oh no looks like Kibana has died. The stability of the system is coming into question now.

nginx-kibana-502-bad-gateway

Hmm it seems there is a one must die situation, as logstash also just dies after a while…

Somehow the server has dow, couldn’t ssh and newrelic not showing the server but on DO it still said it was up. After turning off and on from DO console I am now getting this error and it is the last straw.

kibana-elasticsearch-request-timeout

Tis’ a shame but it is not in the price range at this stage. Will stop the server.

Peter Thiel – Zero to One Book Summary and Highlights

Pieter Thiel – Zero to  One is a series of lectures presented at Stanford University in the US. The course is CS183 The startup and Peter Thiel, a Paypal founder and overall smart guy goes over what we should be thinking about when starting a company. It is more than just starting a company and making money we need to truly invent and improve technology to create value that is orders of magnitude greater than anything else, not jsut incremental improvements. You can get a full copy from MIT Peter Thiel Zero to One

From Zero to One Book Summary

Copying someone else’s idea never works (1 to n)

The best path in a startup are new and untried

Technology allows doing more with less, lower costs or resources which actually increases demand

Brilliant thinking is rare but courage is in even shorter supply

It is ideas that very few other people agree with you on that may hold the key, so don’t seek to gain agreement from your peers

There is 2 kinds of progress..expansive copying things (globalisation) and intensive creating new things (technology)

It’s hard to develop new things in big organisations

“Bureaucratic hierarchies move slowly, and entrenched interests shy away from risk. In the most dysfunctional organizations, signaling that work is being done becomes a better strategy for career advancement than actually doing work (if this describes your company, you should quit now)”

An Excerpt From: Peter Thiel. “Zero to One.” iBooks.

That being said you need to work with other people to get stuff done: small groups

Use what is common / leverage what is common not obscure

DotCom Bubble take homes:
1. Make incremental advances
2. Stay lean and flexible (unplanned, learn by iterating)
3. Improve on the competition – Don’t create a new market, use existing customers
4. Focus on product not sales, if the product needs marketing it’s not good enough

Yet there is an argument that the opposite is true now:
1. It is better to risk boldness than triviality
2. A bad plan is better than no plan
3. Competitive markets destroy profits
4. Sales matters just as much as the product

But this is all lip service and dogma. Probably the best take home is stop following the crowd and think for yourself

What Valuable Company is nobody Building?

Creating value is not good enough, you need to capture some of the value you create – You need to make money with profit margin not breakeven

Economically there is perfect competition and monopoly:
* Perfect competitionIn the long run no company makes an economic profits
* Monopoly – To an economist they all look the same but innovating its way to the top is the method we are looking at not eliminating competition or state license acquisitions. – if you want to create and capture lasting value, don’t build an undifferentiated commodity business.

The lies of the monopoly company: These companies tend to exaggerate the power of their non-existent competition and they expand in to different sectors just to distract from the market the they dominate. They seek to avoid attention. There is an incentive to hide their monopoly lest they get investigated. Described as a union of markets.

The lies of the perfect competition company: They brag about owning the market. Problem is they usually describe a very small or non-existent part of the market instead of the general market for similar products. The incentive is to show that you are different when the stats say the company is doomed to fail. Descirbed as an interscetion of markets

There is such a big advantage in really being the only one doing something, don’t focus on a small part of the business focus on the core…is that differentiated enough?

In a monopoly money is either an important in perfect competition money is everything

Do monopolies negatively affect society: yes they do, but only when nothing changes. Creative monopolies make society better

The incentive to innovate actually comes from wanting to become a monopoly and avoid compeition

Economists like perfect competition because it is easy to model not because it creates the best business

“Monopoly is the condition of every successful business”

competition

Creative Monopoly means new products that benefit everybody and sustainable profits for the creator. Competition means no profits for anybody, no meaningful differentiation, and a struggle for survival.

Competition is very often wasteful and involves ego. It stops you and your business from focusing on what is important. Also consider a merger.

last mover advantage

Monopoly common characteristics:
1. Proprietary software – needs to be 10 times better than its closest substitute ie. invent something completely new eg. Amazon offered 10 time more books than any other, Paypal made eBay 10 times better
2. Network effects – make a product more useful when more people use it. eg. facebook. The intial market is small, you must set out to dominate it.
3. Economies of scale – service businesses are hard to make monopolies. A core group can not provide value to millions. Ifmarginal cost of creating another product is close to zero it is good. A great startup needs scale built into its design.
4. Branding – Not the place to start, but the place to end to build a story and philosophy around the brand of the product. Alng with the above. No company can be built on the brand alone

Every startup should begin with a very small market, because a monopoly dominates a large part of its market
It is far easier to reach a few thousand people that really need your product, that to compete for the attention of millions of scattered indiviuals

Eg. Bezos wanted to dominate retail but started with books because they were all roughly the same shape, easy to ship and the rarity – for physical book stores – attracted more enthusiastic buyers.

Once you dominate a niche market, expand into related slightly broader markets. Amazon can’t increase the number of people that read books so they expanded to CD’s, DVD’s and software.

Discipline is needed to expand gradually

Don't disrupt, avoid competition as much as possible

The mere use of the word disrupt suggests that you are looking at yourself from older firms eyes

Be the last mover – make the last great development in a specific market to gain a monopoly

Growth is easy to measure, but durability isn’t.

The focus should not be on short term growth just because it is easy to measure. Customer retention is very important.

Will this business stil be around a decade from now?

You are not a lottery ticket

Luck is a bullshit excuse to keep people off the trail of right ideas, hard work and keeping things in order

Every company starts in unique circumstances and starts once

Prior generations believed in making their own luck, by working hard

Four views

  • Indefinite pessimism – Bleak future, has no idea what to do about it. eg. Europe. It is self-fulfilling if you are a slacker with low expectations
  • Definite pessimism – Future can be known but is bleak and must be prepared for eg. China relentlessly copying what has worked in the West, older leaders have actually experienced famine
  • Definite optimism – Future will definitely better if we plan to make it better eg. Old Us, People welcomed big plans and questioned whether they would work. Big plans are too important to be left to experts
  • INdefinite optimism – Future will be better but not exactly sure how. A change from the baby boomers effortless progress.

Indefinite Finance

Perfect example, not focussing on anything specific lands you a job in finance. When you get there you realise that even inside high finance everything is indefinite.

In an indefinite world, people prefer unlimited optionality. ie. Money is more important than anything you can do with it

Only in a definite future is money a means to an end, not the end itself

We’re supposed to lsiten to what customers say they want, make just the minimum viable product and iterate our way to success. But leaness is a methodology not a goal. Making small changes to something that already exists might produce a local maximum but it won’t help you create a global maximum.

Iteration without a bold plan won’t take you from 0 to 1

You can’t expect your business to succeed if you are an indefinite optimist. It may work in darwinism but in startups intelligent designs work best. Why?

Apple imagined and executed definite multi-year plans to create new products and distribute them effectively. Not through careful planning, listening to focus groups feedback and copying other’s successes.

Founders only sell when they have no concrete vision for the company
Definite founders don’t sell, meaning the price was not high enough

We need to seek a definite future

Follow the Money

Never underestimate exponential growth

Severely unequal distributions – the law of the universe

Venture capital funds try a spray and play approach but that is a problem as returns are not evenly distributed among companies. As the venture returns are governed by the power law, not normal distribution. That is a small handful of companies radically outperform others.
As a VC investor you need a single-minded pursuit of the rare companies that become overwhelmingly valuable.

2 rules:
1. Only invest in companies that can return more than the entire value of the fund (Eliminating most investments)
2. No other rules

That is why investment in these companies are large, a 312x payoff for example would need to invest enough to return the value of the entire fund.
Every company in a VC portfolio must have the potential to succeed on a vast scale.

As soon as you look at a diversified hedging of the fund, it is more a financial question, a question of buying lottery tickets that you are prepared to lose.

Keep diversity to a minimum

You can’t diversify your life by keeping every possible career path open

That is what school does, it teaches you not to believe in the power law. Everyone has the same generic knowledge.

You should focus relentlessly on what you are good at, but only focus on that if you think it will be valuable in the future

Too many people think about starting their own company people that understand the power law will hesitate. They know that joining the best company when it is growing fast is more important.

If you do start your own comapny:
* 1 market will probably be better than all the others
* One distribution strategy will trump the others
* Time and decision making follow the power law, some matter far more than others

Think about where your actions will fall on the curve

Secrets

Elementary mathematics is essential but it won’t give you an edge

What important truth do very few people agree with you on?

Contrarian thinking doesn’t make much sense unless the world still has secrets to give up

On the other hand, mysteries are impossible and you shouldn’t waste your time on them. They cannot be achieved.

What valuable business is nobody building? Every answer is a secret – something important and unknown, hard to do but doable.

All fundementalists allow no middle ground

Social trends that have conspired to root out belief in secrets:
* incrementalism – one step at a time, over achievement is not credited
* risk aversion – people are scared of being wrong. If your goal is to never make a mistake then you should not look for secrets.
* complacency – social elites have the most freedom and ability to explore new thinking but seem to believe in secrets less. Thinking everyhting is set and made for you in life.
* flatness – the huge pool of competition, smarter or more creative people out there. Too big to contribute something unique.

Very few people take unorthodox ideas serious these days

To say there a no secrets is to say we live in a society with no hidden injustices

disbelief in secrets leads to faith in efficient markets, massive bubbles disprove efficient markets

The market reflects all knowable information and cannot be questioned, what bullshit

HP used to invent things and it became big. Yet when it started a campaign to market invent it stopped inventing things, created HP services a glorified consultancy and merged with Compaq as it had run out of ideas. The board split into 2 factions, one part led by Tom Perkins (a creator) who pushed for identifying the most promising new technologies and build them. The other factions led by Patricia Dunn (A banker) argued that it was beyond what the board could do, predict the technological future. There was in-fighting in the board, politics, security measures and gossip. It cracked.

You can’t find secrets without looking for them

If you think something that is hard is impossible, you’ll never start trying to achieve it. Belief in secrets is an effective truth.

Why are university lecturers obsessed about telling students how little their academic research will have on the total knowledge. That is just boxing yourself into not finding a secret.

How to find secrets

  • Natural secrets – exist all around us and one must study some undiscovered aspect of the physical world What secrets is nature not telling you?
  • Secrets about people – things people don’t know about themselves or things they hide so other’s don’t know What secrets are people not telling you?

A secret already exposed is how monopolists downplay their monopoly status to avoid scrutiny. While competitive firms strategically exaggerate their uniqueness

The best place to look for secrets is where no one else is looking. Using conventional wisdom will not uncover secrets.

What fields matter that haven’t been institutionalised?

Nutrition for example matters a lot but you can’t specialise in it and most of the research is flawed and was done 30 years ago. Probably backed by big food capital and has led to obesity.

What to do with Secrets

Unless you have perfectly conventional beliefs it is rarely a god idea to tell everybody everything you know

Only tell who you need to and no one else

A great company is a conspiracy to change the world

Foundations

The start is very important. Bad decisions made early on are very hard to correct after they are made.

The founders (matrimony) need to be similar and have similar intentions and ways of thinking. How well the founders know each other and how well they work together matters. Founders need to have a history, otherwise they are just rolling dice.

Ownership, possession and control

Everyone in your company needs to get along and work well together

It’s very hard to go from zero to one without a team

You also need a structure to keep everyone aligned long term

Need to distinguish:
* Ownership – Who legally owns a company’s equity?
* Possession – Who runs day-to-day tasks?
* Control – Who governs company affairs?

Be careful about misalignment

Best example is government departments, that we own. But the ownership is just a guise as the possession by the clerks and public sector entitled employees enjoy wasting our time with their petty small-time powers.
The bureacrats supposedly controlling the place have no say in it’s operation.

CEO’s own stock of a company, but a trivial amount. So he is incentivised to reward himself through the power of possession and not ownership. That is why shareholders are treated as second best. Then this is perpetuated by valuing short term gains and short term cost cutting than long term investment. Misalignment where the CEO is not creating value for shareholders.

Most conflict arises between ownership and control, between founders and the board.

The board

In the boardroom, less is more:
* easier communication
* reach consensus
* effective oversight

A board of three is ideal. Board should never exceed 5 people.

A huge board will exercise no oversight at all

On the bus or off the bus

Anyone who doesn’t own stock options or draw a regular salary is misaligned. People should work full time (exception for lawyers and accountants)

They will be biased to claim value in the near term

That is why hiring consultants does not work

Part time employees don’t work

Even working remotely is difficult

You are either on the bus or you are off

Cash is not king

A company does better the less it pays it’s CEO – single clearest indicator

Earning that makes you a politician not a founder. Focus shifts from creating value.

Low CEO pay also sets the standard for everyone else

High compensation teaches workers to claim value from the company rather than create it

Equity is the best form of compensation as it orients people to create value in the future. Allocating it equally is a mistake. It is difficult to achieve perfect fairness so it is better companies keep it secret.

Equity is also not as liquid as cash (could be illiquid) so an added boundary

Best way to keep everyone aligned

Mechanics of Mafia

Without substance perks don’t work

Company culture does not exist without a company

Why would you work with a group of people that don’t even like eachother

Time is your most valuable asset, it is odd to spend it working with people who don’t envision any long-term future together

Recruiting is a core competency for any company, it should never be outsourced

Attracting the best must include:
* why your mission is compelling – why you are doing something important that no-one else will get done
* Why is the people a unique match for him/her personally?

You can’t fight the perk war

You probably don’t want the employee that only joins if he/she can bring his/her dog into work

The startup uniform: Everyone at your company should be different in the same way

It’s easier to manage people if they are doing just one thing

Of Cults and consultants

The opposite of a cult is a consulting firm. Lacking a distinctive mission of its own. Individuals are dropping in and out of companies with which they have no long-term connection.

The best startups are like cults. The biggest difference is that cults tend to be fanatically wrong about something important, whereas startups are right about something everyone else has missed.

Don’t worry if your company doesn’t make sense to the regular professional

If you build it, will they come?

We underestimate the importance of distribution – a catchall term for everything it takes to sell a product

Engineers are biased towards making cool stuff rather than selling it

Advertising works, even if you think it doesn’t

Nerds are used to transparency because of the technical skills, sales is the opposite it a campaign to change the appearance without altering the contents.

Engineers overestimate the difficulty of their jobs as the problem is known, in distribution they aren’t.

Salesmen’s priority is persuasion not sincerity. We react badly to awkwardly obvious salesmen…the bad ones.

Like acting, sales works best when hidden

The (business) world is secretly driven by salespeople, even though there is effort to hide it at every level

The holy grail is a product that sells itself…but anyone who says this about a real product must be lying. He’s either lying or selling something.

Distribution is central to the design of your product

How to sell a product

Superior sales and distribution can create a monopoly, even with no product differentiation

Two metrics set the limit for effective distribution:
* CLV (Customer Lifetime Value) the total net profit that you earn on average over the course of the relationship with the customer must exceed the amount you spend to acquire the customer CAC (Customer Acquisition Cost)

The higher price of the product, the more you have to spend to make the sale and you should spend it
* Viral Marketing = R1 per sale (consumers)
* Marketing = R100 per sale (small business)
* Sales = R10000 per sale
* Complex Sales = R10 million (Big government business)

Complex sales

At high prices ( > R10 million), businesses want to speak to the CEO, not the VP or sales.

Businesses with complex growth models, succeed if they achieve 50% – 100% year-on-year growth over a decade.

Lower prices. The key is how to establish a process where a sales team can move product to a wider audience.

Sometimes the product itself is a kind of distribution

personal sales requires people, traditional advertising does not.
Between them is a deadzone, there may be no good distribution channel, ie. advertising would be too broad and inefficient for the product. The product needs personal sales but you don’t have the resources and spending money will make you end up losing it.

Advertising and marketing only works on inexpensive products that don’t have the abiity to go Viral

You can’t compete with big firms in advertising and marketing

Viral means you can share it/invite others to use (it is best to do this inconspicuosly don’t have a big share button, rather say “Send money to a friend”)

Whoever is first to dominate the most important segment of a market with viral potential will be the last mover in the whole market

You want to get the most valuable users first, not just any user

The power law: One distribution is going to be far more powerful than any of the others

If you can get one distribution channel to work, you have a great business

You also need to sell your company to non-customers: employees and investors.

Everyone has a product to sell, if you look around and there are no salespeople you are the sales person

Man and Machine

Computers are compliments for humans, not replacements

People compete for jobs and resources, computers compete for neither

Computers are tools, not rivals

Computers don’t yearn for a more luxurious life

A partnership of man and machine can achieve dramatically better results

“Big Data”, people mistakedly believe that more data means more value

True actionable insight can only come from human analysts

Don’t ignore the big feats accomplished with computers, due to a small feat achieved by a comouter alone.

Seeing Green

The famous seven questions:

  1. The Engineering Question

Can you create breakthrough technology instead of incremental improvements?

Your product/service needs to aim at being 10x better than nearest competitor

  1. The Timing Question

Is now the right time to start your particular business?

  1. The Monopoly Question

Are you starting with a big share of a small market?

Customers don’t care about a particular kind of technology, unless it solves a particular problem in a superior way

Don't exaggerate your own uniqueness

Also don’t rhetorically shrink your market, to favour your uniqueness or monopoly

  1. The People Question

Do you have the right team?

Real technologists wear t-shirts and jeans, not suit and ties

Don't invest in a tech CEO that wears a suit

There’s nothing wrong with a CEO that can sell, but if he actually looks like a salesman, he’s probably bad at sales and worse at tech

  1. The Distribution Question

Do you have a way to not just create but deliver your product?

Don’t forget about the customer, in the place of investor and government

It needs to be useful

  1. The Durability Question

Will your market position be defensible 10 and 20 years into the future?

Every entrepreneur should aim to be the last mover in a particular market, so you need to lookto the future

Cleantech underestimated China and that fossil fuels become cleaner and cheaper (fracking)

  1. The Secret Question

Have you identified a unique opportunity that others don’t see?

Great companies have secrets: specific reasons for success that other people don’t see.

social entrepreneurship – This philanthropic approach to business starts with the idea that corporations and nonprofits have until now been polar opposites: corporations have great power, but they’re shackled to the profit motive; nonprofits pursue the public interest, but they’re weak players in the wider economy. Social entrepreneurs aim to combine the best of both worlds and “do well by “doing good.” Usually they end up doing neither.”

No secret is ever so important, that just participating will give you success

The challenge is thinking small

The Founder’s Paradox

Founders are extremes, they follow an inverse normal distribution.

There is irreplaceable value in a company’s founder

The most important task in business—the creation of new value—cannot be reduced to a formula and applied by professionals

A unique founder can make authorative decisions, inspire strong personal loyalty and plan ahead for decades.

Paradoxically, impersonal bureaucracies staffed by trained professionals can last longer than any lifetime, but they usually act with short time horizons and get very little done

We need founders and should be tolerant of their ways, we need unusual individuals to lead companies beyond incrementalism.

Great founders bring the best out of people that work for them.

Stagnation or Singularity

Will this stability we take for granted last?

When you add competition to consume scarce resources, it’s hard to see how a global plateau could last indefinitely. Without new technology to relieve competitive pressures, stagnation is likely to erupt into conflict. In case of conflict on a global scale, stagnation collapses into extinction.

We cannot take for granted that the future will be better, and that means we need to work to create it today.

Only by seeing our world anew, as fresh and strange as it was to the ancients who saw it first, can we both re-create it and preserve it for the future.